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/send-follow.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/send-follow.ts')
-rw-r--r-- | server/lib/activitypub/send/send-follow.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts index 46d08c17b..170b46b48 100644 --- a/server/lib/activitypub/send/send-follow.ts +++ b/server/lib/activitypub/send/send-follow.ts | |||
@@ -15,12 +15,12 @@ function sendFollow (actorFollow: ActorFollowModel) { | |||
15 | logger.info('Creating job to send follow request to %s.', following.url) | 15 | logger.info('Creating job to send follow request to %s.', following.url) |
16 | 16 | ||
17 | const url = getActorFollowActivityPubUrl(actorFollow) | 17 | const url = getActorFollowActivityPubUrl(actorFollow) |
18 | const data = followActivityData(url, me, following) | 18 | const data = buildFollowActivity(url, me, following) |
19 | 19 | ||
20 | return unicastTo(data, me, following.inboxUrl) | 20 | return unicastTo(data, me, following.inboxUrl) |
21 | } | 21 | } |
22 | 22 | ||
23 | function followActivityData (url: string, byActor: ActorModel, targetActor: ActorModel): ActivityFollow { | 23 | function buildFollowActivity (url: string, byActor: ActorModel, targetActor: ActorModel): ActivityFollow { |
24 | return { | 24 | return { |
25 | type: 'Follow', | 25 | type: 'Follow', |
26 | id: url, | 26 | id: url, |
@@ -33,5 +33,5 @@ function followActivityData (url: string, byActor: ActorModel, targetActor: Acto | |||
33 | 33 | ||
34 | export { | 34 | export { |
35 | sendFollow, | 35 | sendFollow, |
36 | followActivityData | 36 | buildFollowActivity |
37 | } | 37 | } |