diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-23 12:04:15 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 5b77537ce54832f47931ba47dc513be2a9197f92 (patch) | |
tree | 4f968168f1346faa82ac6c9663778e1cca65b02a /server/lib/notifier.ts | |
parent | d8e9a42c4b048b2669ab6a61704682ce23fbcf99 (diff) | |
download | PeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.tar.gz PeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.tar.zst PeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.zip |
Correctly notify on auto blacklist
Diffstat (limited to 'server/lib/notifier.ts')
-rw-r--r-- | server/lib/notifier.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/notifier.ts b/server/lib/notifier.ts index c1e63fa8f..a7dfb0979 100644 --- a/server/lib/notifier.ts +++ b/server/lib/notifier.ts | |||
@@ -22,9 +22,9 @@ class Notifier { | |||
22 | 22 | ||
23 | private constructor () {} | 23 | private constructor () {} |
24 | 24 | ||
25 | notifyOnNewVideo (video: VideoModel): void { | 25 | notifyOnNewVideoIfNeeded (video: VideoModel): void { |
26 | // Only notify on public and published videos which are not blacklisted | 26 | // Only notify on public and published videos which are not blacklisted |
27 | if (video.privacy !== VideoPrivacy.PUBLIC || video.state !== VideoState.PUBLISHED || video.VideoBlacklist) return | 27 | if (video.privacy !== VideoPrivacy.PUBLIC || video.state !== VideoState.PUBLISHED || video.isBlacklisted()) return |
28 | 28 | ||
29 | this.notifySubscribersOfNewVideo(video) | 29 | this.notifySubscribersOfNewVideo(video) |
30 | .catch(err => logger.error('Cannot notify subscribers of new video %s.', video.url, { err })) | 30 | .catch(err => logger.error('Cannot notify subscribers of new video %s.', video.url, { err })) |