-async function autoBlacklistVideoIfNeeded (video: VideoModel, user?: UserModel, transaction?: Transaction) {
- const doAutoBlacklist = await Hooks.wrapPromise(
- autoBlacklistNeeded({ video, user }),
+async function autoBlacklistVideoIfNeeded (parameters: {
+ 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.wrapFun(
+ autoBlacklistNeeded,
+ { video, user, isRemote, isNew },