X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fsend%2Fsend-follow.ts;h=57501dadb0551eecf31342749be1bf9a4ca60fd9;hb=bae616273d455d225d131eb17c56db6c20a0b6b3;hp=aeeb50a2a9410932e2e58a435feae1201d4e6f98;hpb=57e4e1c1a95c3a81a967f54ecc2a510d8b0e129c;p=github%2FChocobozzz%2FPeerTube.git 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) { const data = buildFollowActivity(actorFollow.url, me, following) - t.afterCommit(() => unicastTo(data, me, following.inboxUrl)) + return t.afterCommit(() => { + return unicastTo({ data, byActor: me, toActorUrl: following.inboxUrl, contextType: 'Follow' }) + }) } function buildFollowActivity (url: string, byActor: MActor, targetActor: MActor): ActivityFollow {