diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/send/misc.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/lib/activitypub/send/misc.ts b/server/lib/activitypub/send/misc.ts index 261586ae4..dc0d3de57 100644 --- a/server/lib/activitypub/send/misc.ts +++ b/server/lib/activitypub/send/misc.ts | |||
@@ -143,6 +143,10 @@ async function getActorsInvolvedInVideo (video: VideoModel, t: Transaction) { | |||
143 | async function getAudience (actorSender: ActorModel, t: Transaction, isPublic = true) { | 143 | async function getAudience (actorSender: ActorModel, t: Transaction, isPublic = true) { |
144 | const followerInboxUrls = await actorSender.getFollowerSharedInboxUrls(t) | 144 | const followerInboxUrls = await actorSender.getFollowerSharedInboxUrls(t) |
145 | 145 | ||
146 | return buildAudience(followerInboxUrls, isPublic) | ||
147 | } | ||
148 | |||
149 | function buildAudience (followerInboxUrls: string[], isPublic = true) { | ||
146 | // Thanks Mastodon: https://github.com/tootsuite/mastodon/blob/master/app/lib/activitypub/tag_manager.rb#L47 | 150 | // Thanks Mastodon: https://github.com/tootsuite/mastodon/blob/master/app/lib/activitypub/tag_manager.rb#L47 |
147 | let to = [] | 151 | let to = [] |
148 | let cc = [] | 152 | let cc = [] |
@@ -183,6 +187,7 @@ async function computeUris (toActors: ActorModel[], actorsException: ActorModel[ | |||
183 | export { | 187 | export { |
184 | broadcastToFollowers, | 188 | broadcastToFollowers, |
185 | unicastTo, | 189 | unicastTo, |
190 | buildAudience, | ||
186 | getAudience, | 191 | getAudience, |
187 | getOriginVideoAudience, | 192 | getOriginVideoAudience, |
188 | getActorsInvolvedInVideo, | 193 | getActorsInvolvedInVideo, |