diff options
Diffstat (limited to 'server/controllers')
-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 97bf9b052..2793ae267 100644 --- a/server/controllers/activitypub/outbox.ts +++ b/server/controllers/activitypub/outbox.ts | |||
@@ -47,17 +47,14 @@ async function buildActivities (actor: ActorModel, start: number, count: number) | |||
47 | const actors = data.data.map(v => v.VideoChannel.Account.Actor) | 47 | const actors = data.data.map(v => v.VideoChannel.Account.Actor) |
48 | actors.push(actor) | 48 | actors.push(actor) |
49 | 49 | ||
50 | const followersMatrix = await ActorModel.getActorsFollowerSharedInboxUrls(actors, undefined) | ||
51 | |||
52 | for (const video of data.data) { | 50 | for (const video of data.data) { |
53 | const byActor = video.VideoChannel.Account.Actor | 51 | const byActor = video.VideoChannel.Account.Actor |
54 | const createActivityAudience = buildAudience(followersMatrix[byActor.id], video.privacy === VideoPrivacy.PUBLIC) | 52 | const createActivityAudience = buildAudience([ byActor.followersUrl ], video.privacy === VideoPrivacy.PUBLIC) |
55 | 53 | ||
56 | // This is a shared video | 54 | // This is a shared video |
57 | if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { | 55 | if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { |
58 | const videoShare = video.VideoShares[0] | 56 | const videoShare = video.VideoShares[0] |
59 | const announceAudience = buildAudience(followersMatrix[actor.id], video.privacy === VideoPrivacy.PUBLIC) | 57 | const announceActivity = await announceActivityData(videoShare.url, actor, video.url, undefined, createActivityAudience) |
60 | const announceActivity = await announceActivityData(videoShare.url, actor, video.url, undefined, announceAudience) | ||
61 | 58 | ||
62 | activities.push(announceActivity) | 59 | activities.push(announceActivity) |
63 | } else { | 60 | } else { |