aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-19 10:52:31 +0100
committerChocobozzz <me@florianbigard.com>2021-02-19 10:52:31 +0100
commit2a021e6cb6836864bb013d5ff451e8a4ae45c9b7 (patch)
tree26ef1746b01f647223ab17b3a6b1a6a59a1118c1 /server/models/video
parent285981f4dd1bdeaac32cb3f99be55edac9ef3f78 (diff)
downloadPeerTube-2a021e6cb6836864bb013d5ff451e8a4ae45c9b7.tar.gz
PeerTube-2a021e6cb6836864bb013d5ff451e8a4ae45c9b7.tar.zst
PeerTube-2a021e6cb6836864bb013d5ff451e8a4ae45c9b7.zip
Fix thread replies API response
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video-comment.ts28
1 files changed, 17 insertions, 11 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index cfd1d5b7a..dc7556d44 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -483,20 +483,26 @@ export class VideoCommentModel extends Model {
483 order: [ [ 'createdAt', 'ASC' ], [ 'updatedAt', 'ASC' ] ] as Order, 483 order: [ [ 'createdAt', 'ASC' ], [ 'updatedAt', 'ASC' ] ] as Order,
484 where: { 484 where: {
485 videoId, 485 videoId,
486 [Op.or]: [ 486 [Op.and]: [
487 { id: threadId },
488 { originCommentId: threadId }
489 ],
490 [Op.or]: [
491 { 487 {
492 accountId: { 488 [Op.or]: [
493 [Op.notIn]: Sequelize.literal( 489 { id: threadId },
494 '(' + buildBlockedAccountSQL(blockerAccountIds) + ')' 490 { originCommentId: threadId }
495 ) 491 ]
496 }
497 }, 492 },
498 { 493 {
499 accountId: null 494 [Op.or]: [
495 {
496 accountId: {
497 [Op.notIn]: Sequelize.literal(
498 '(' + buildBlockedAccountSQL(blockerAccountIds) + ')'
499 )
500 }
501 },
502 {
503 accountId: null
504 }
505 ]
500 } 506 }
501 ] 507 ]
502 } 508 }