]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/emailer.ts
Add tests when getting a blacklisted video
[github/Chocobozzz/PeerTube.git] / server / lib / emailer.ts
index a1212878fa3acf31efe9d5ed2b53d769963be75e..c8398c9e73031fa8f3b38d55bd91d63e52680687 100644 (file)
@@ -138,6 +138,8 @@ class Emailer {
   async addVideoUnblacklistReportJob (videoId: number) {
     const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoId)
     if (!video) throw new Error('Unknown Video id during Blacklist report.')
+    // It's not our user
+    if (video.remote === true) return
 
     const user = await UserModel.loadById(video.VideoChannel.Account.userId)