X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fsend%2Fsend-undo.ts;h=8fcbbac5c95a94a0dfa35e96d38f4607a078c9a4;hb=2284f202070aa2e49156cc52b3b1596a7d5aadec;hp=ecbf605d664da5f8e6b1aab4672a141673535b2c;hpb=b718fd22374d64534bcfe69932cf562894abed6a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/send/send-undo.ts b/server/lib/activitypub/send/send-undo.ts index ecbf605d6..8fcbbac5c 100644 --- a/server/lib/activitypub/send/send-undo.ts +++ b/server/lib/activitypub/send/send-undo.ts @@ -31,13 +31,13 @@ async function sendUndoFollow (actorFollow: ActorFollowModel, t: Transaction) { logger.info('Creating job to send an unfollow request to %s.', following.url) - const followUrl = getActorFollowActivityPubUrl(actorFollow) + const followUrl = getActorFollowActivityPubUrl(me, following) const undoUrl = getUndoActivityPubUrl(followUrl) const followActivity = buildFollowActivity(followUrl, me, following) const undoActivity = undoActivityData(undoUrl, me, followActivity) - return unicastTo(undoActivity, me, following.inboxUrl) + t.afterCommit(() => unicastTo(undoActivity, me, following.inboxUrl)) } async function sendUndoAnnounce (byActor: ActorModel, videoShare: VideoShareModel, video: VideoModel, t: Transaction) {