diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video-comment.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index b7ed6240e..6d60271e6 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -381,13 +381,20 @@ export class VideoCommentModel extends Model<VideoCommentModel> { | |||
381 | return VideoCommentModel.findAndCountAll<MComment>(query) | 381 | return VideoCommentModel.findAndCountAll<MComment>(query) |
382 | } | 382 | } |
383 | 383 | ||
384 | static listForFeed (start: number, count: number, videoId?: number): Bluebird<MCommentOwnerVideoFeed[]> { | 384 | static async listForFeed (start: number, count: number, videoId?: number): Promise<MCommentOwnerVideoFeed[]> { |
385 | const serverActor = await getServerActor() | ||
386 | |||
385 | const query = { | 387 | const query = { |
386 | order: [ [ 'createdAt', 'DESC' ] ] as Order, | 388 | order: [ [ 'createdAt', 'DESC' ] ] as Order, |
387 | offset: start, | 389 | offset: start, |
388 | limit: count, | 390 | limit: count, |
389 | where: { | 391 | where: { |
390 | deletedAt: null | 392 | deletedAt: null, |
393 | accountId: { | ||
394 | [Op.notIn]: Sequelize.literal( | ||
395 | '(' + buildBlockedAccountSQL(serverActor.Account.id) + ')' | ||
396 | ) | ||
397 | } | ||
391 | }, | 398 | }, |
392 | include: [ | 399 | include: [ |
393 | { | 400 | { |