aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-comment.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-comment.ts')
-rw-r--r--server/models/video/video-comment.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index bdf5d86bc..e1faf2b9a 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -69,14 +69,10 @@ export enum ScopeNames {
69 Sequelize.literal( 69 Sequelize.literal(
70 '(' + 70 '(' +
71 'WITH "blocklist" AS (' + buildBlockedAccountSQL(blockerAccountIds) + ')' + 71 'WITH "blocklist" AS (' + buildBlockedAccountSQL(blockerAccountIds) + ')' +
72 'SELECT COUNT("replies"."id") - (' + 72 'SELECT COUNT("replies"."id") ' +
73 'SELECT COUNT("replies"."id") ' +
74 'FROM "videoComment" AS "replies" ' +
75 'WHERE "replies"."originCommentId" = "VideoCommentModel"."id" ' +
76 'AND "accountId" IN (SELECT "id" FROM "blocklist")' +
77 ')' +
78 'FROM "videoComment" AS "replies" ' + 73 'FROM "videoComment" AS "replies" ' +
79 'WHERE "replies"."originCommentId" = "VideoCommentModel"."id" ' + 74 'WHERE "replies"."originCommentId" = "VideoCommentModel"."id" ' +
75 'AND "deletedAt" IS NULL ' +
80 'AND "accountId" NOT IN (SELECT "id" FROM "blocklist")' + 76 'AND "accountId" NOT IN (SELECT "id" FROM "blocklist")' +
81 ')' 77 ')'
82 ), 78 ),