+ async addVideoAbuseReport (videoId: number) {
+ const video = await VideoModel.load(videoId)
+
+ const text = `Hi,\n\n` +
+ `Your instance received an abuse for video the following video ${video.url}\n\n` +
+ `Cheers,\n` +
+ `PeerTube.`
+
+ const to = await UserModel.listEmailsWithRight(UserRight.MANAGE_VIDEO_ABUSES)
+ const emailPayload: EmailPayload = {
+ to,
+ subject: '[PeerTube] Received a video abuse',
+ text
+ }
+
+ return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
+ }
+