aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/emailer.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-14 09:16:32 +0200
committerChocobozzz <me@florianbigard.com>2018-08-14 09:27:19 +0200
commite5e7f7fe99bd0e8d6f3fa0b8ae8cf255ecaa6bf3 (patch)
treead3bd3f278f37d22b1124d7ae99e8f2a5c2c00f1 /server/lib/emailer.ts
parent191764f30b0a812bf3a9dbdc7daf1d5afe25e12a (diff)
downloadPeerTube-e5e7f7fe99bd0e8d6f3fa0b8ae8cf255ecaa6bf3.tar.gz
PeerTube-e5e7f7fe99bd0e8d6f3fa0b8ae8cf255ecaa6bf3.tar.zst
PeerTube-e5e7f7fe99bd0e8d6f3fa0b8ae8cf255ecaa6bf3.zip
Add tests when getting a blacklisted video
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r--server/lib/emailer.ts2
1 files changed, 2 insertions, 0 deletions
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 {
138 async addVideoUnblacklistReportJob (videoId: number) { 138 async addVideoUnblacklistReportJob (videoId: number) {
139 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoId) 139 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoId)
140 if (!video) throw new Error('Unknown Video id during Blacklist report.') 140 if (!video) throw new Error('Unknown Video id during Blacklist report.')
141 // It's not our user
142 if (video.remote === true) return
141 143
142 const user = await UserModel.loadById(video.VideoChannel.Account.userId) 144 const user = await UserModel.loadById(video.VideoChannel.Account.userId)
143 145