diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-28 12:13:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-28 12:13:00 +0200 |
commit | e3d5ea4f82ffbb51eae3471f004bf382b07ea04c (patch) | |
tree | 1289fb5b9dee76591edf1bcc0d45bcc8716e0ae3 /server/controllers | |
parent | 9007daff8262bcb539eb5fa74919828f425b5f69 (diff) | |
download | PeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.tar.gz PeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.tar.zst PeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.zip |
Fix actor outbox
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 { |