blob: 0188be1aaf2453ba395852e187656ed6c741e91a (
plain) (
tree)
|
|
import { waitJobs } from './jobs'
import { PeerTubeServer } from './server'
async function doubleFollow (server1: PeerTubeServer, server2: PeerTubeServer) {
await Promise.all([
server1.follows.follow({ targets: [ server2.url ] }),
server2.follows.follow({ targets: [ server1.url ] })
])
// Wait request propagation
await waitJobs([ server1, server2 ])
return true
}
// ---------------------------------------------------------------------------
export {
doubleFollow
}
|