diff options
author | Chocobozzz <me@florianbigard.com> | 2020-09-25 10:04:21 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | a5cf76afa378aae81af2a9b0ce548e5d2582f832 (patch) | |
tree | 58da320232bee7c9656774c5d6811e82bbf6c696 /server/lib/video-blacklist.ts | |
parent | de6310b2fcbb8a6b79c546b23dfa1920724faaa7 (diff) | |
download | PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.tar.gz PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.tar.zst PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.zip |
Add watch messages if live has not started
Diffstat (limited to 'server/lib/video-blacklist.ts')
-rw-r--r-- | server/lib/video-blacklist.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/lib/video-blacklist.ts b/server/lib/video-blacklist.ts index bdbcffda6..f6c66b6dd 100644 --- a/server/lib/video-blacklist.ts +++ b/server/lib/video-blacklist.ts | |||
@@ -17,6 +17,7 @@ import { sendDeleteVideo } from './activitypub/send' | |||
17 | import { federateVideoIfNeeded } from './activitypub/videos' | 17 | import { federateVideoIfNeeded } from './activitypub/videos' |
18 | import { Notifier } from './notifier' | 18 | import { Notifier } from './notifier' |
19 | import { Hooks } from './plugins/hooks' | 19 | import { Hooks } from './plugins/hooks' |
20 | import { LiveManager } from './live-manager' | ||
20 | 21 | ||
21 | async function autoBlacklistVideoIfNeeded (parameters: { | 22 | async function autoBlacklistVideoIfNeeded (parameters: { |
22 | video: MVideoWithBlacklistLight | 23 | video: MVideoWithBlacklistLight |
@@ -73,6 +74,10 @@ async function blacklistVideo (videoInstance: MVideoAccountLight, options: Video | |||
73 | await sendDeleteVideo(videoInstance, undefined) | 74 | await sendDeleteVideo(videoInstance, undefined) |
74 | } | 75 | } |
75 | 76 | ||
77 | if (videoInstance.isLive) { | ||
78 | LiveManager.Instance.stopSessionOf(videoInstance.id) | ||
79 | } | ||
80 | |||
76 | Notifier.Instance.notifyOnVideoBlacklist(blacklist) | 81 | Notifier.Instance.notifyOnVideoBlacklist(blacklist) |
77 | } | 82 | } |
78 | 83 | ||