]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/notifier.ts
Remove comment federation by video owner
[github/Chocobozzz/PeerTube.git] / server / lib / notifier.ts
index c1e63fa8faad41de2f5cc3c67a27e257e46d255f..a7dfb09794017c1a14d64253a13c2f78d61672f6 100644 (file)
@@ -22,9 +22,9 @@ class Notifier {
 
   private constructor () {}
 
-  notifyOnNewVideo (video: VideoModel): void {
+  notifyOnNewVideoIfNeeded (video: VideoModel): void {
     // Only notify on public and published videos which are not blacklisted
-    if (video.privacy !== VideoPrivacy.PUBLIC || video.state !== VideoState.PUBLISHED || video.VideoBlacklist) return
+    if (video.privacy !== VideoPrivacy.PUBLIC || video.state !== VideoState.PUBLISHED || video.isBlacklisted()) return
 
     this.notifySubscribersOfNewVideo(video)
       .catch(err => logger.error('Cannot notify subscribers of new video %s.', video.url, { err }))