]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/send-follow.ts
Convert followers/following in raw SQL queries
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / send-follow.ts
index aeeb50a2a9410932e2e58a435feae1201d4e6f98..57501dadb0551eecf31342749be1bf9a4ca60fd9 100644 (file)
@@ -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 {