aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
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/activitypub
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/activitypub')
-rw-r--r--server/lib/activitypub/videos.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index 049e06cff..ab23ff507 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -66,6 +66,7 @@ import { FilteredModelAttributes } from '../../types/sequelize'
66import { ActorFollowScoreCache } from '../files-cache' 66import { ActorFollowScoreCache } from '../files-cache'
67import { JobQueue } from '../job-queue' 67import { JobQueue } from '../job-queue'
68import { Notifier } from '../notifier' 68import { Notifier } from '../notifier'
69import { PeerTubeSocket } from '../peertube-socket'
69import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail' 70import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail'
70import { setVideoTags } from '../video' 71import { setVideoTags } from '../video'
71import { autoBlacklistVideoIfNeeded } from '../video-blacklist' 72import { autoBlacklistVideoIfNeeded } from '../video-blacklist'
@@ -348,6 +349,7 @@ async function updateVideoFromAP (options: {
348 video.privacy = videoData.privacy 349 video.privacy = videoData.privacy
349 video.channelId = videoData.channelId 350 video.channelId = videoData.channelId
350 video.views = videoData.views 351 video.views = videoData.views
352 video.isLive = videoData.isLive
351 353
352 const videoUpdated = await video.save(sequelizeOptions) as MVideoFullLight 354 const videoUpdated = await video.save(sequelizeOptions) as MVideoFullLight
353 355
@@ -434,6 +436,7 @@ async function updateVideoFromAP (options: {
434 }) 436 })
435 437
436 if (wasPrivateVideo || wasUnlistedVideo) Notifier.Instance.notifyOnNewVideoIfNeeded(videoUpdated) // Notify our users? 438 if (wasPrivateVideo || wasUnlistedVideo) Notifier.Instance.notifyOnNewVideoIfNeeded(videoUpdated) // Notify our users?
439 if (videoUpdated.isLive) PeerTubeSocket.Instance.sendVideoLiveNewState(video)
437 440
438 logger.info('Remote video with uuid %s updated', videoObject.uuid) 441 logger.info('Remote video with uuid %s updated', videoObject.uuid)
439 442