aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
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 = [ ]