X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fvideo-blacklist.ts;h=3b90b1b9415982071d6deff43dacbeb18ec47b59;hb=a15871560f80e07386c1dabb8370cd2664ecfd1f;hp=1dd45b76d9d1fe742c52d4beef611aa991f357e6;hpb=a22046d166805222ca76060e471b6cb3d419a32d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/video-blacklist.ts b/server/lib/video-blacklist.ts index 1dd45b76d..3b90b1b94 100644 --- a/server/lib/video-blacklist.ts +++ b/server/lib/video-blacklist.ts @@ -9,15 +9,15 @@ import { Notifier } from './notifier' import { MUser, MVideoBlacklistVideo, MVideoWithBlacklistLight } from '@server/typings/models' async function autoBlacklistVideoIfNeeded (parameters: { - video: MVideoWithBlacklistLight, - user?: MUser, - isRemote: boolean, - isNew: boolean, - notify?: boolean, + video: MVideoWithBlacklistLight + user?: MUser + isRemote: boolean + isNew: boolean + notify?: boolean transaction?: Transaction }) { const { video, user, isRemote, isNew, notify = true, transaction } = parameters - const doAutoBlacklist = await Hooks.wrapPromiseFun( + const doAutoBlacklist = await Hooks.wrapFun( autoBlacklistNeeded, { video, user, isRemote, isNew }, 'filter:video.auto-blacklist.result' @@ -49,10 +49,10 @@ async function autoBlacklistVideoIfNeeded (parameters: { return true } -async function autoBlacklistNeeded (parameters: { - video: MVideoWithBlacklistLight, - isRemote: boolean, - isNew: boolean, +function autoBlacklistNeeded (parameters: { + video: MVideoWithBlacklistLight + isRemote: boolean + isNew: boolean user?: MUser }) { const { user, video, isRemote, isNew } = parameters