diff options
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r-- | server/controllers/activitypub/outbox.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts index ab12a7c4b..41c6ffaeb 100644 --- a/server/controllers/activitypub/outbox.ts +++ b/server/controllers/activitypub/outbox.ts | |||
@@ -43,21 +43,18 @@ async function outboxController (req: express.Request, res: express.Response, ne | |||
43 | const followersMatrix = await ActorModel.getActorsFollowerSharedInboxUrls(actors, undefined) | 43 | const followersMatrix = await ActorModel.getActorsFollowerSharedInboxUrls(actors, undefined) |
44 | 44 | ||
45 | for (const video of data.data) { | 45 | for (const video of data.data) { |
46 | const videoObject = video.toActivityPubObject() | ||
47 | |||
48 | const byActor = video.VideoChannel.Account.Actor | 46 | const byActor = video.VideoChannel.Account.Actor |
49 | const createActivityAudience = buildAudience(followersMatrix[byActor.id]) | 47 | const createActivityAudience = buildAudience(followersMatrix[byActor.id]) |
50 | 48 | ||
51 | // This is a shared video | 49 | // This is a shared video |
52 | if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { | 50 | if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { |
53 | const createActivity = await createActivityData(video.url, byActor, videoObject, undefined, createActivityAudience) | ||
54 | |||
55 | const announceAudience = buildAudience(followersMatrix[actor.id]) | 51 | const announceAudience = buildAudience(followersMatrix[actor.id]) |
56 | const url = getAnnounceActivityPubUrl(video.url, actor) | 52 | const url = getAnnounceActivityPubUrl(video.url, actor) |
57 | const announceActivity = await announceActivityData(url, actor, createActivity, undefined, announceAudience) | 53 | const announceActivity = await announceActivityData(url, actor, video.url, undefined, announceAudience) |
58 | 54 | ||
59 | activities.push(announceActivity) | 55 | activities.push(announceActivity) |
60 | } else { | 56 | } else { |
57 | const videoObject = video.toActivityPubObject() | ||
61 | const createActivity = await createActivityData(video.url, byActor, videoObject, undefined, createActivityAudience) | 58 | const createActivity = await createActivityData(video.url, byActor, videoObject, undefined, createActivityAudience) |
62 | 59 | ||
63 | activities.push(createActivity) | 60 | activities.push(createActivity) |