mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Activity Pub improvements
This commit is contained in:
parent
05bc4dfa06
commit
9a8cbd8278
4 changed files with 10 additions and 6 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue