diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-11 16:27:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-13 14:05:49 +0200 |
commit | c48e82b5e0478434de30626d14594a97f2402e7c (patch) | |
tree | a78e5272bd0fe4f5b41831e571e02d05f1515b82 /server/lib/activitypub/send/utils.ts | |
parent | a651038487faa838bda3ce04695b08bc65baff70 (diff) | |
download | PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.gz PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.zst PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.zip |
Basic video redundancy implementation
Diffstat (limited to 'server/lib/activitypub/send/utils.ts')
-rw-r--r-- | server/lib/activitypub/send/utils.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/activitypub/send/utils.ts b/server/lib/activitypub/send/utils.ts index da437292e..c20c15633 100644 --- a/server/lib/activitypub/send/utils.ts +++ b/server/lib/activitypub/send/utils.ts | |||
@@ -59,11 +59,11 @@ async function forwardActivity ( | |||
59 | async function broadcastToFollowers ( | 59 | async function broadcastToFollowers ( |
60 | data: any, | 60 | data: any, |
61 | byActor: ActorModel, | 61 | byActor: ActorModel, |
62 | toActorFollowers: ActorModel[], | 62 | toFollowersOf: ActorModel[], |
63 | t: Transaction, | 63 | t: Transaction, |
64 | actorsException: ActorModel[] = [] | 64 | actorsException: ActorModel[] = [] |
65 | ) { | 65 | ) { |
66 | const uris = await computeFollowerUris(toActorFollowers, actorsException, t) | 66 | const uris = await computeFollowerUris(toFollowersOf, actorsException, t) |
67 | return broadcastTo(uris, data, byActor) | 67 | return broadcastTo(uris, data, byActor) |
68 | } | 68 | } |
69 | 69 | ||
@@ -115,8 +115,8 @@ export { | |||
115 | 115 | ||
116 | // --------------------------------------------------------------------------- | 116 | // --------------------------------------------------------------------------- |
117 | 117 | ||
118 | async function computeFollowerUris (toActorFollower: ActorModel[], actorsException: ActorModel[], t: Transaction) { | 118 | async function computeFollowerUris (toFollowersOf: ActorModel[], actorsException: ActorModel[], t: Transaction) { |
119 | const toActorFollowerIds = toActorFollower.map(a => a.id) | 119 | const toActorFollowerIds = toFollowersOf.map(a => a.id) |
120 | 120 | ||
121 | const result = await ActorFollowModel.listAcceptedFollowerSharedInboxUrls(toActorFollowerIds, t) | 121 | const result = await ActorFollowModel.listAcceptedFollowerSharedInboxUrls(toActorFollowerIds, t) |
122 | const sharedInboxesException = await buildSharedInboxesException(actorsException) | 122 | const sharedInboxesException = await buildSharedInboxesException(actorsException) |