]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/misc.ts
Activity Pub improvements
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / misc.ts
index 2a9f4cae868ac0bf0b8c8181d52433a326b9ad72..261586ae43b3bdbd26aaf7ca1d8b8cff4b07916d 100644 (file)
@@ -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)
 }