aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-04 14:16:57 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commit68e70a745b2010cd0199864a2addd60d8f99c732 (patch)
treea0b1b061d205321e0f6eb80e5b44d7afd06aab14 /server/lib/activitypub
parent97969c4edf51b37eee691adba43368bb0fbb729b (diff)
downloadPeerTube-68e70a745b2010cd0199864a2addd60d8f99c732.tar.gz
PeerTube-68e70a745b2010cd0199864a2addd60d8f99c732.tar.zst
PeerTube-68e70a745b2010cd0199864a2addd60d8f99c732.zip
Add save replay live tests
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/videos.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index ea1e6a38f..ab4aac0a1 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -85,7 +85,7 @@ async function federateVideoIfNeeded (videoArg: MVideoAPWithoutCaption, isNewVid
85 // Check this is not a blacklisted video, or unfederated blacklisted video 85 // Check this is not a blacklisted video, or unfederated blacklisted video
86 (video.isBlacklisted() === false || (isNewVideo === false && video.VideoBlacklist.unfederated === false)) && 86 (video.isBlacklisted() === false || (isNewVideo === false && video.VideoBlacklist.unfederated === false)) &&
87 // Check the video is public/unlisted and published 87 // Check the video is public/unlisted and published
88 video.hasPrivacyForFederation() && (video.state === VideoState.PUBLISHED || video.state === VideoState.WAITING_FOR_LIVE) 88 video.hasPrivacyForFederation() && video.hasStateForFederation()
89 ) { 89 ) {
90 // Fetch more attributes that we will need to serialize in AP object 90 // Fetch more attributes that we will need to serialize in AP object
91 if (isArray(video.VideoCaptions) === false) { 91 if (isArray(video.VideoCaptions) === false) {
@@ -302,7 +302,7 @@ async function updateVideoFromAP (options: {
302}) { 302}) {
303 const { video, videoObject, account, channel, overrideTo } = options 303 const { video, videoObject, account, channel, overrideTo } = options
304 304
305 logger.debug('Updating remote video "%s".', options.videoObject.uuid, { account, channel }) 305 logger.debug('Updating remote video "%s".', options.videoObject.uuid, { videoObject: options.videoObject, account, channel })
306 306
307 let videoFieldsSave: any 307 let videoFieldsSave: any
308 const wasPrivateVideo = video.privacy === VideoPrivacy.PRIVATE 308 const wasPrivateVideo = video.privacy === VideoPrivacy.PRIVATE
@@ -562,6 +562,8 @@ function isAPHashTagObject (url: any): url is ActivityHashTagObject {
562 return url && url.type === 'Hashtag' 562 return url && url.type === 'Hashtag'
563} 563}
564 564
565
566
565async function createVideo (videoObject: VideoObject, channel: MChannelAccountLight, waitThumbnail = false) { 567async function createVideo (videoObject: VideoObject, channel: MChannelAccountLight, waitThumbnail = false) {
566 logger.debug('Adding remote video %s.', videoObject.id) 568 logger.debug('Adding remote video %s.', videoObject.id)
567 569