aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/activitypub/outbox.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-11 16:27:07 +0200
committerChocobozzz <me@florianbigard.com>2018-09-13 14:05:49 +0200
commitc48e82b5e0478434de30626d14594a97f2402e7c (patch)
treea78e5272bd0fe4f5b41831e571e02d05f1515b82 /server/controllers/activitypub/outbox.ts
parenta651038487faa838bda3ce04695b08bc65baff70 (diff)
downloadPeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.gz
PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.zst
PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.zip
Basic video redundancy implementation
Diffstat (limited to 'server/controllers/activitypub/outbox.ts')
-rw-r--r--server/controllers/activitypub/outbox.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts
index db69ae54b..bd0e4fe9d 100644
--- a/server/controllers/activitypub/outbox.ts
+++ b/server/controllers/activitypub/outbox.ts
@@ -3,7 +3,7 @@ import { Activity } from '../../../shared/models/activitypub/activity'
3import { VideoPrivacy } from '../../../shared/models/videos' 3import { VideoPrivacy } from '../../../shared/models/videos'
4import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' 4import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub'
5import { logger } from '../../helpers/logger' 5import { logger } from '../../helpers/logger'
6import { announceActivityData, createActivityData } from '../../lib/activitypub/send' 6import { buildAnnounceActivity, buildCreateActivity } from '../../lib/activitypub/send'
7import { buildAudience } from '../../lib/activitypub/audience' 7import { buildAudience } from '../../lib/activitypub/audience'
8import { asyncMiddleware, localAccountValidator, localVideoChannelValidator } from '../../middlewares' 8import { asyncMiddleware, localAccountValidator, localVideoChannelValidator } from '../../middlewares'
9import { AccountModel } from '../../models/account/account' 9import { AccountModel } from '../../models/account/account'
@@ -60,12 +60,12 @@ async function buildActivities (actor: ActorModel, start: number, count: number)
60 // This is a shared video 60 // This is a shared video
61 if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { 61 if (video.VideoShares !== undefined && video.VideoShares.length !== 0) {
62 const videoShare = video.VideoShares[0] 62 const videoShare = video.VideoShares[0]
63 const announceActivity = announceActivityData(videoShare.url, actor, video.url, createActivityAudience) 63 const announceActivity = buildAnnounceActivity(videoShare.url, actor, video.url, createActivityAudience)
64 64
65 activities.push(announceActivity) 65 activities.push(announceActivity)
66 } else { 66 } else {
67 const videoObject = video.toActivityPubObject() 67 const videoObject = video.toActivityPubObject()
68 const createActivity = createActivityData(video.url, byActor, videoObject, createActivityAudience) 68 const createActivity = buildCreateActivity(video.url, byActor, videoObject, createActivityAudience)
69 69
70 activities.push(createActivity) 70 activities.push(createActivity)
71 } 71 }