aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/activitypub/client.ts2
-rw-r--r--server/controllers/api/videos/comment.ts2
2 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index f94abf808..e48641836 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -285,7 +285,7 @@ async function videoCommentsController (req: express.Request, res: express.Respo
285 const video = res.locals.onlyImmutableVideo 285 const video = res.locals.onlyImmutableVideo
286 286
287 const handler = async (start: number, count: number) => { 287 const handler = async (start: number, count: number) => {
288 const result = await VideoCommentModel.listAndCountByVideoId(video.id, start, count) 288 const result = await VideoCommentModel.listAndCountByVideoForAP(video, start, count)
289 return { 289 return {
290 total: result.count, 290 total: result.count,
291 data: result.rows.map(r => r.url) 291 data: result.rows.map(r => r.url)
diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts
index 2dcb85ecf..45ff969d9 100644
--- a/server/controllers/api/videos/comment.ts
+++ b/server/controllers/api/videos/comment.ts
@@ -78,6 +78,7 @@ async function listVideoThreads (req: express.Request, res: express.Response) {
78 if (video.commentsEnabled === true) { 78 if (video.commentsEnabled === true) {
79 const apiOptions = await Hooks.wrapObject({ 79 const apiOptions = await Hooks.wrapObject({
80 videoId: video.id, 80 videoId: video.id,
81 isVideoOwned: video.isOwned(),
81 start: req.query.start, 82 start: req.query.start,
82 count: req.query.count, 83 count: req.query.count,
83 sort: req.query.sort, 84 sort: req.query.sort,
@@ -108,6 +109,7 @@ async function listVideoThreadComments (req: express.Request, res: express.Respo
108 if (video.commentsEnabled === true) { 109 if (video.commentsEnabled === true) {
109 const apiOptions = await Hooks.wrapObject({ 110 const apiOptions = await Hooks.wrapObject({
110 videoId: video.id, 111 videoId: video.id,
112 isVideoOwned: video.isOwned(),
111 threadId: res.locals.videoCommentThread.id, 113 threadId: res.locals.videoCommentThread.id,
112 user 114 user
113 }, 'filter:api.video-thread-comments.list.params') 115 }, 'filter:api.video-thread-comments.list.params')