aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-blacklist.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-09-25 10:04:21 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commita5cf76afa378aae81af2a9b0ce548e5d2582f832 (patch)
tree58da320232bee7c9656774c5d6811e82bbf6c696 /server/lib/video-blacklist.ts
parentde6310b2fcbb8a6b79c546b23dfa1920724faaa7 (diff)
downloadPeerTube-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.ts5
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'
17import { federateVideoIfNeeded } from './activitypub/videos' 17import { federateVideoIfNeeded } from './activitypub/videos'
18import { Notifier } from './notifier' 18import { Notifier } from './notifier'
19import { Hooks } from './plugins/hooks' 19import { Hooks } from './plugins/hooks'
20import { LiveManager } from './live-manager'
20 21
21async function autoBlacklistVideoIfNeeded (parameters: { 22async 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