From e5e7f7fe99bd0e8d6f3fa0b8ae8cf255ecaa6bf3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 14 Aug 2018 09:16:32 +0200 Subject: Add tests when getting a blacklisted video --- server/lib/emailer.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/lib') diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index a1212878f..c8398c9e7 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts @@ -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) -- cgit v1.2.3