1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +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

@ -3,7 +3,7 @@ import { ActorModel } from '../../../models/activitypub/actor'
import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
import { getActorFollowAcceptActivityPubUrl, getActorFollowActivityPubUrl } from '../url'
import { unicastTo } from './utils'
import { followActivityData } from './send-follow'
import { buildFollowActivity } from './send-follow'
import { logger } from '../../../helpers/logger'
async function sendAccept (actorFollow: ActorFollowModel) {
@ -18,10 +18,10 @@ async function sendAccept (actorFollow: ActorFollowModel) {
logger.info('Creating job to accept follower %s.', follower.url)
const followUrl = getActorFollowActivityPubUrl(actorFollow)
const followData = followActivityData(followUrl, follower, me)
const followData = buildFollowActivity(followUrl, follower, me)
const url = getActorFollowAcceptActivityPubUrl(actorFollow)
const data = acceptActivityData(url, me, followData)
const data = buildAcceptActivity(url, me, followData)
return unicastTo(data, me, follower.inboxUrl)
}
@ -34,7 +34,7 @@ export {
// ---------------------------------------------------------------------------
function acceptActivityData (url: string, byActor: ActorModel, followActivityData: ActivityFollow): ActivityAccept {
function buildAcceptActivity (url: string, byActor: ActorModel, followActivityData: ActivityFollow): ActivityAccept {
return {
type: 'Accept',
id: url,