Add filter hooks tests

This commit is contained in:
Chocobozzz
2019-07-22 11:14:58 +02:00
committed by Chocobozzz
parent 89cd127560
commit 6691c52280
10 changed files with 260 additions and 41 deletions

View File

@@ -210,13 +210,15 @@ async function isVideoCommentAccepted (req: express.Request, res: express.Respon
if (isReply) {
const acceptReplyParameters = Object.assign(acceptParameters, { parentComment: res.locals.videoComment })
acceptedResult = await Hooks.wrapObject(
isLocalVideoCommentReplyAccepted(acceptReplyParameters),
acceptedResult = await Hooks.wrapFun(
isLocalVideoCommentReplyAccepted,
acceptReplyParameters,
'filter:api.video-comment-reply.create.accept.result'
)
} else {
acceptedResult = await Hooks.wrapObject(
isLocalVideoThreadAccepted(acceptParameters),
acceptedResult = await Hooks.wrapFun(
isLocalVideoThreadAccepted,
acceptParameters,
'filter:api.video-thread.create.accept.result'
)
}