aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/blacklist.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-23 12:04:15 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit5b77537ce54832f47931ba47dc513be2a9197f92 (patch)
tree4f968168f1346faa82ac6c9663778e1cca65b02a /server/controllers/api/videos/blacklist.ts
parentd8e9a42c4b048b2669ab6a61704682ce23fbcf99 (diff)
downloadPeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.tar.gz
PeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.tar.zst
PeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.zip
Correctly notify on auto blacklist
Diffstat (limited to 'server/controllers/api/videos/blacklist.ts')
-rw-r--r--server/controllers/api/videos/blacklist.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts
index 0ec518e0d..9ff494def 100644
--- a/server/controllers/api/videos/blacklist.ts
+++ b/server/controllers/api/videos/blacklist.ts
@@ -115,6 +115,7 @@ async function removeVideoFromBlacklistController (req: express.Request, res: ex
115 const videoBlacklistType = videoBlacklist.type 115 const videoBlacklistType = videoBlacklist.type
116 116
117 await videoBlacklist.destroy({ transaction: t }) 117 await videoBlacklist.destroy({ transaction: t })
118 video.VideoBlacklist = undefined
118 119
119 // Re federate the video 120 // Re federate the video
120 if (unfederated === true) { 121 if (unfederated === true) {
@@ -131,7 +132,7 @@ async function removeVideoFromBlacklistController (req: express.Request, res: ex
131 132
132 // Delete on object so new video notifications will send 133 // Delete on object so new video notifications will send
133 delete video.VideoBlacklist 134 delete video.VideoBlacklist
134 Notifier.Instance.notifyOnNewVideo(video) 135 Notifier.Instance.notifyOnNewVideoIfNeeded(video)
135 } 136 }
136 137
137 logger.info('Video %s removed from blacklist.', res.locals.video.uuid) 138 logger.info('Video %s removed from blacklist.', res.locals.video.uuid)