diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-11 16:27:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-13 14:05:49 +0200 |
commit | c48e82b5e0478434de30626d14594a97f2402e7c (patch) | |
tree | a78e5272bd0fe4f5b41831e571e02d05f1515b82 /server/controllers/activitypub/outbox.ts | |
parent | a651038487faa838bda3ce04695b08bc65baff70 (diff) | |
download | PeerTube-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.ts | 6 |
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' | |||
3 | import { VideoPrivacy } from '../../../shared/models/videos' | 3 | import { VideoPrivacy } from '../../../shared/models/videos' |
4 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' | 4 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' |
5 | import { logger } from '../../helpers/logger' | 5 | import { logger } from '../../helpers/logger' |
6 | import { announceActivityData, createActivityData } from '../../lib/activitypub/send' | 6 | import { buildAnnounceActivity, buildCreateActivity } from '../../lib/activitypub/send' |
7 | import { buildAudience } from '../../lib/activitypub/audience' | 7 | import { buildAudience } from '../../lib/activitypub/audience' |
8 | import { asyncMiddleware, localAccountValidator, localVideoChannelValidator } from '../../middlewares' | 8 | import { asyncMiddleware, localAccountValidator, localVideoChannelValidator } from '../../middlewares' |
9 | import { AccountModel } from '../../models/account/account' | 9 | import { 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 | } |