diff options
Diffstat (limited to 'server/models/video/video-comment.ts')
-rw-r--r-- | server/models/video/video-comment.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index c2798e82a..fb4d16b4d 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -62,8 +62,10 @@ enum ScopeNames { | |||
62 | '(' + | 62 | '(' + |
63 | 'SELECT COUNT("replies"."id") ' + | 63 | 'SELECT COUNT("replies"."id") ' + |
64 | 'FROM "videoComment" AS "replies" ' + | 64 | 'FROM "videoComment" AS "replies" ' + |
65 | 'INNER JOIN "video" ON "video"."id" = "replies"."videoId" ' + | ||
66 | 'INNER JOIN "videoChannel" ON "videoChannel"."id" = "video"."channelId" ' + | ||
65 | 'WHERE "replies"."originCommentId" = "VideoCommentModel"."id" ' + | 67 | 'WHERE "replies"."originCommentId" = "VideoCommentModel"."id" ' + |
66 | 'AND "accountId" = ' + userAccountId + | 68 | 'AND "replies"."accountId" = "videoChannel"."accountId"' + |
67 | ')' | 69 | ')' |
68 | ), | 70 | ), |
69 | 'totalRepliesFromVideoAuthor' | 71 | 'totalRepliesFromVideoAuthor' |