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/activitypub | |
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/activitypub')
-rw-r--r-- | server/lib/activitypub/videos.ts | 3 |
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' | |||
66 | import { ActorFollowScoreCache } from '../files-cache' | 66 | import { ActorFollowScoreCache } from '../files-cache' |
67 | import { JobQueue } from '../job-queue' | 67 | import { JobQueue } from '../job-queue' |
68 | import { Notifier } from '../notifier' | 68 | import { Notifier } from '../notifier' |
69 | import { PeerTubeSocket } from '../peertube-socket' | ||
69 | import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail' | 70 | import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail' |
70 | import { setVideoTags } from '../video' | 71 | import { setVideoTags } from '../video' |
71 | import { autoBlacklistVideoIfNeeded } from '../video-blacklist' | 72 | import { 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 | ||