From 9a8cbd8278a37ee414f17d7de7c7281123484ba1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Jan 2018 19:17:43 +0100 Subject: Activity Pub improvements --- server/lib/activitypub/send/misc.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/lib/activitypub/send') 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 const toActorFollowerIds = toActorFollower.map(a => a.id) const result = await ActorFollowModel.listAcceptedFollowerSharedInboxUrls(toActorFollowerIds, t) - const sharedInboxesException = actorsException.map(f => f.sharedInboxUrl) + const sharedInboxesException = actorsException.map(f => f.sharedInboxUrl || f.inboxUrl) return result.data.filter(sharedInbox => sharedInboxesException.indexOf(sharedInbox) === -1) } async function computeUris (toActors: ActorModel[], actorsException: ActorModel[] = []) { - const toActorSharedInboxesSet = new Set(toActors.map(a => a.sharedInboxUrl)) + const toActorSharedInboxesSet = new Set(toActors.map(a => a.sharedInboxUrl || a.inboxUrl)) - const sharedInboxesException = actorsException.map(f => f.sharedInboxUrl) + const sharedInboxesException = actorsException.map(f => f.sharedInboxUrl || f.inboxUrl) return Array.from(toActorSharedInboxesSet) .filter(sharedInbox => sharedInboxesException.indexOf(sharedInbox) === -1) } -- cgit v1.2.3