- const text = `Hi,\n\n` +
- `${CONFIG.WEBSERVER.HOST} received an abuse for the following video ${videoUrl}\n\n` +
- `Cheers,\n` +
- `PeerTube.`
+ const emailPayload: EmailPayload = {
+ to,
+ subject: CONFIG.EMAIL.SUBJECT.PREFIX + 'Received a video abuse',
+ text
+ }
+
+ return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
+ }
+
+ addVideoAutoBlacklistModeratorsNotification (to: string[], videoBlacklist: MVideoBlacklistLightVideo) {
+ const VIDEO_AUTO_BLACKLIST_URL = WEBSERVER.URL + '/admin/moderation/video-auto-blacklist/list'
+ const videoUrl = WEBSERVER.URL + videoBlacklist.Video.getWatchStaticPath()
+
+ const text = 'Hi,\n\n' +
+ 'A recently added video was auto-blacklisted and requires moderator review before publishing.' +
+ '\n\n' +
+ `You can view it and take appropriate action on ${videoUrl}` +
+ '\n\n' +
+ `A full list of auto-blacklisted videos can be reviewed here: ${VIDEO_AUTO_BLACKLIST_URL}` +
+ '\n\n' +
+ 'Cheers,\n' +
+ `${CONFIG.EMAIL.BODY.SIGNATURE}`