X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Flib%2Fnotifier.ts;h=89f91e0311c6db307f7ff4a1c294c207dfae431f;hb=3487330d308166afb542cbacae0475693c0b059e;hp=3e90bb57e8a461a38ae9aa06c4c939f44810c023;hpb=5baee5fca418487e72ddcd6419d31bca8659b668;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/notifier.ts b/server/lib/notifier.ts index 3e90bb57e..89f91e031 100644 --- a/server/lib/notifier.ts +++ b/server/lib/notifier.ts @@ -387,7 +387,7 @@ class Notifier { } private async notifyModeratorsOfVideoAutoBlacklist (videoBlacklist: MVideoBlacklistLightVideo) { - const moderators = await UserModel.listWithRight(UserRight.MANAGE_VIDEO_BLOCKS) + const moderators = await UserModel.listWithRight(UserRight.MANAGE_VIDEO_BLACKLIST) if (moderators.length === 0) return logger.info('Notifying %s moderators of video auto-blacklist %s.', moderators.length, videoBlacklist.Video.url) @@ -398,7 +398,7 @@ class Notifier { async function notificationCreator (user: MUserWithNotificationSetting) { const notification = await UserNotificationModel.create({ - type: UserNotificationType.VIDEO_AUTO_BLOCK_FOR_MODERATORS, + type: UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS, userId: user.id, videoBlacklistId: videoBlacklist.id }) @@ -426,7 +426,7 @@ class Notifier { async function notificationCreator (user: MUserWithNotificationSetting) { const notification = await UserNotificationModel.create({ - type: UserNotificationType.BLOCK_ON_MY_VIDEO, + type: UserNotificationType.BLACKLIST_ON_MY_VIDEO, userId: user.id, videoBlacklistId: videoBlacklist.id }) @@ -454,7 +454,7 @@ class Notifier { async function notificationCreator (user: MUserWithNotificationSetting) { const notification = await UserNotificationModel.create({ - type: UserNotificationType.UNBLOCK_ON_MY_VIDEO, + type: UserNotificationType.UNBLACKLIST_ON_MY_VIDEO, userId: user.id, videoId: video.id })