]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/utils.ts
Basic video redundancy implementation
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / utils.ts
index da437292eef24543457f6d2b77793e49b9ceed70..c20c156331a4be9ac0f27c3eac77d3d35323effb 100644 (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)