]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - follows.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / follows.ts
... / ...
CommitLineData
1import { waitJobs } from './jobs'
2import { ServerInfo } from './servers'
3
4async function doubleFollow (server1: ServerInfo, server2: ServerInfo) {
5 await Promise.all([
6 server1.followsCommand.follow({ targets: [ server2.url ] }),
7 server2.followsCommand.follow({ targets: [ server1.url ] })
8 ])
9
10 // Wait request propagation
11 await waitJobs([ server1, server2 ])
12
13 return true
14}
15
16// ---------------------------------------------------------------------------
17
18export {
19 doubleFollow
20}