mirror of https://github.com/Chocobozzz/PeerTube
Fix thread replies API response
parent
285981f4dd
commit
2a021e6cb6
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue