aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-28 12:13:00 +0200
committerChocobozzz <me@florianbigard.com>2018-05-28 12:13:00 +0200
commite3d5ea4f82ffbb51eae3471f004bf382b07ea04c (patch)
tree1289fb5b9dee76591edf1bcc0d45bcc8716e0ae3 /server/lib/activitypub
parent9007daff8262bcb539eb5fa74919828f425b5f69 (diff)
downloadPeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.tar.gz
PeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.tar.zst
PeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.zip
Fix actor outbox
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/audience.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/activitypub/audience.ts b/server/lib/activitypub/audience.ts
index 916358fe2..c1265dbcd 100644
--- a/server/lib/activitypub/audience.ts
+++ b/server/lib/activitypub/audience.ts
@@ -59,14 +59,13 @@ async function getAudience (actorSender: ActorModel, t: Transaction, isPublic =
59 return buildAudience([ actorSender.followersUrl ], isPublic) 59 return buildAudience([ actorSender.followersUrl ], isPublic)
60} 60}
61 61
62function buildAudience (followerInboxUrls: string[], isPublic = true) { 62function buildAudience (followerUrls: string[], isPublic = true) {
63 // Thanks Mastodon: https://github.com/tootsuite/mastodon/blob/master/app/lib/activitypub/tag_manager.rb#L47
64 let to = [] 63 let to = []
65 let cc = [] 64 let cc = []
66 65
67 if (isPublic) { 66 if (isPublic) {
68 to = [ ACTIVITY_PUB.PUBLIC ] 67 to = [ ACTIVITY_PUB.PUBLIC ]
69 cc = followerInboxUrls 68 cc = followerUrls
70 } else { // Unlisted 69 } else { // Unlisted
71 to = [ ] 70 to = [ ]
72 cc = [ ] 71 cc = [ ]