aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/send/send-follow.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-23 16:14:33 +0100
committerChocobozzz <me@florianbigard.com>2022-03-24 09:40:46 +0100
commita219c9100b3ce8774d454497d46be87465bf664e (patch)
treecaa869e47919a9e23cc86dcece1100e239683b8c /server/lib/activitypub/send/send-follow.ts
parent7e98a7df7d04e19ba67163a86c7b876d78d76839 (diff)
downloadPeerTube-a219c9100b3ce8774d454497d46be87465bf664e.tar.gz
PeerTube-a219c9100b3ce8774d454497d46be87465bf664e.tar.zst
PeerTube-a219c9100b3ce8774d454497d46be87465bf664e.zip
Refactor AP context builder
Diffstat (limited to 'server/lib/activitypub/send/send-follow.ts')
-rw-r--r--server/lib/activitypub/send/send-follow.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts
index aeeb50a2a..57501dadb 100644
--- a/server/lib/activitypub/send/send-follow.ts
+++ b/server/lib/activitypub/send/send-follow.ts
@@ -15,7 +15,9 @@ function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
15 15
16 const data = buildFollowActivity(actorFollow.url, me, following) 16 const data = buildFollowActivity(actorFollow.url, me, following)
17 17
18 t.afterCommit(() => unicastTo(data, me, following.inboxUrl)) 18 return t.afterCommit(() => {
19 return unicastTo({ data, byActor: me, toActorUrl: following.inboxUrl, contextType: 'Follow' })
20 })
19} 21}
20 22
21function buildFollowActivity (url: string, byActor: MActor, targetActor: MActor): ActivityFollow { 23function buildFollowActivity (url: string, byActor: MActor, targetActor: MActor): ActivityFollow {