diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts index b21698525..38fa7c3b0 100644 --- a/server/controllers/api/videos/comment.ts +++ b/server/controllers/api/videos/comment.ts @@ -166,8 +166,6 @@ async function listVideoThreadComments (req: express.Request, res: express.Respo } } - logger.info('coucou', { resultList }) - if (resultList.data.length === 0) { return res.sendStatus(HttpStatusCode.NOT_FOUND_404) } 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 { order: [ [ 'createdAt', 'ASC' ], [ 'updatedAt', 'ASC' ] ] as Order, where: { videoId, - [Op.or]: [ - { id: threadId }, - { originCommentId: threadId } - ], - [Op.or]: [ + [Op.and]: [ { - accountId: { - [Op.notIn]: Sequelize.literal( - '(' + buildBlockedAccountSQL(blockerAccountIds) + ')' - ) - } + [Op.or]: [ + { id: threadId }, + { originCommentId: threadId } + ] }, { - accountId: null + [Op.or]: [ + { + accountId: { + [Op.notIn]: Sequelize.literal( + '(' + buildBlockedAccountSQL(blockerAccountIds) + ')' + ) + } + }, + { + accountId: null + } + ] } ] }