1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Basic video redundancy implementation

This commit is contained in:
Chocobozzz 2018-09-11 16:27:07 +02:00
parent a651038487
commit c48e82b5e0
77 changed files with 1667 additions and 287 deletions

View file

@ -59,11 +59,11 @@ async function forwardActivity (
async function broadcastToFollowers (
data: any,
byActor: ActorModel,
toActorFollowers: ActorModel[],
toFollowersOf: ActorModel[],
t: Transaction,
actorsException: ActorModel[] = []
) {
const uris = await computeFollowerUris(toActorFollowers, actorsException, t)
const uris = await computeFollowerUris(toFollowersOf, actorsException, t)
return broadcastTo(uris, data, byActor)
}
@ -115,8 +115,8 @@ export {
// ---------------------------------------------------------------------------
async function computeFollowerUris (toActorFollower: ActorModel[], actorsException: ActorModel[], t: Transaction) {
const toActorFollowerIds = toActorFollower.map(a => a.id)
async function computeFollowerUris (toFollowersOf: ActorModel[], actorsException: ActorModel[], t: Transaction) {
const toActorFollowerIds = toFollowersOf.map(a => a.id)
const result = await ActorFollowModel.listAcceptedFollowerSharedInboxUrls(toActorFollowerIds, t)
const sharedInboxesException = await buildSharedInboxesException(actorsException)