]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/blacklist.ts
Cleaner warning of IP address leaking on embedded videos (#2034)
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / blacklist.ts
index 0ec518e0d629505908e06572483ce6ccd299cda1..9ff494defbd74746ad8a551190d7db245f4b87ce 100644 (file)
@@ -115,6 +115,7 @@ async function removeVideoFromBlacklistController (req: express.Request, res: ex
     const videoBlacklistType = videoBlacklist.type
 
     await videoBlacklist.destroy({ transaction: t })
+    video.VideoBlacklist = undefined
 
     // Re federate the video
     if (unfederated === true) {
@@ -131,7 +132,7 @@ async function removeVideoFromBlacklistController (req: express.Request, res: ex
 
     // Delete on object so new video notifications will send
     delete video.VideoBlacklist
-    Notifier.Instance.notifyOnNewVideo(video)
+    Notifier.Instance.notifyOnNewVideoIfNeeded(video)
   }
 
   logger.info('Video %s removed from blacklist.', res.locals.video.uuid)