diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-11 19:17:43 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-11 19:17:43 +0100 |
commit | 9a8cbd8278a37ee414f17d7de7c7281123484ba1 (patch) | |
tree | 11dcf06211e6e49cfb638172c3fa65011ff7fb88 /server/lib/activitypub/send | |
parent | 05bc4dfa069be5273765a68652598d72dbf482fb (diff) | |
download | PeerTube-9a8cbd8278a37ee414f17d7de7c7281123484ba1.tar.gz PeerTube-9a8cbd8278a37ee414f17d7de7c7281123484ba1.tar.zst PeerTube-9a8cbd8278a37ee414f17d7de7c7281123484ba1.zip |
Activity Pub improvements
Diffstat (limited to 'server/lib/activitypub/send')
-rw-r--r-- | server/lib/activitypub/send/misc.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/send/misc.ts b/server/lib/activitypub/send/misc.ts index 2a9f4cae8..261586ae4 100644 --- a/server/lib/activitypub/send/misc.ts +++ b/server/lib/activitypub/send/misc.ts | |||
@@ -166,14 +166,14 @@ async function computeFollowerUris (toActorFollower: ActorModel[], actorsExcepti | |||
166 | const toActorFollowerIds = toActorFollower.map(a => a.id) | 166 | const toActorFollowerIds = toActorFollower.map(a => a.id) |
167 | 167 | ||
168 | const result = await ActorFollowModel.listAcceptedFollowerSharedInboxUrls(toActorFollowerIds, t) | 168 | const result = await ActorFollowModel.listAcceptedFollowerSharedInboxUrls(toActorFollowerIds, t) |
169 | const sharedInboxesException = actorsException.map(f => f.sharedInboxUrl) | 169 | const sharedInboxesException = actorsException.map(f => f.sharedInboxUrl || f.inboxUrl) |
170 | return result.data.filter(sharedInbox => sharedInboxesException.indexOf(sharedInbox) === -1) | 170 | return result.data.filter(sharedInbox => sharedInboxesException.indexOf(sharedInbox) === -1) |
171 | } | 171 | } |
172 | 172 | ||
173 | async function computeUris (toActors: ActorModel[], actorsException: ActorModel[] = []) { | 173 | async function computeUris (toActors: ActorModel[], actorsException: ActorModel[] = []) { |
174 | const toActorSharedInboxesSet = new Set(toActors.map(a => a.sharedInboxUrl)) | 174 | const toActorSharedInboxesSet = new Set(toActors.map(a => a.sharedInboxUrl || a.inboxUrl)) |
175 | 175 | ||
176 | const sharedInboxesException = actorsException.map(f => f.sharedInboxUrl) | 176 | const sharedInboxesException = actorsException.map(f => f.sharedInboxUrl || f.inboxUrl) |
177 | return Array.from(toActorSharedInboxesSet) | 177 | return Array.from(toActorSharedInboxesSet) |
178 | .filter(sharedInbox => sharedInboxesException.indexOf(sharedInbox) === -1) | 178 | .filter(sharedInbox => sharedInboxesException.indexOf(sharedInbox) === -1) |
179 | } | 179 | } |