diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-15 09:17:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-15 10:40:06 +0200 |
commit | eae0365b5c5468e51e9795b0e894815ebda86b4a (patch) | |
tree | 5da54b28c94d43d1715a0c69e35eb1cf3a1a959d /server/lib/activitypub/process/process-follow.ts | |
parent | 51f636ad0f928bb94069c9143e38df0518f6e4a7 (diff) | |
download | PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.tar.gz PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.tar.zst PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.zip |
Fix missing transactions
Diffstat (limited to 'server/lib/activitypub/process/process-follow.ts')
-rw-r--r-- | server/lib/activitypub/process/process-follow.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts index 9009c6469..f85238f8e 100644 --- a/server/lib/activitypub/process/process-follow.ts +++ b/server/lib/activitypub/process/process-follow.ts | |||
@@ -43,7 +43,7 @@ async function processFollow (byActor: MActorSignature, activityId: string, targ | |||
43 | if (isFollowingInstance && CONFIG.FOLLOWERS.INSTANCE.ENABLED === false) { | 43 | if (isFollowingInstance && CONFIG.FOLLOWERS.INSTANCE.ENABLED === false) { |
44 | logger.info('Rejecting %s because instance followers are disabled.', targetActor.url) | 44 | logger.info('Rejecting %s because instance followers are disabled.', targetActor.url) |
45 | 45 | ||
46 | await sendReject(activityId, byActor, targetActor) | 46 | sendReject(activityId, byActor, targetActor) |
47 | 47 | ||
48 | return { actorFollow: undefined as MActorFollowActors } | 48 | return { actorFollow: undefined as MActorFollowActors } |
49 | } | 49 | } |
@@ -84,8 +84,9 @@ async function processFollow (byActor: MActorSignature, activityId: string, targ | |||
84 | 84 | ||
85 | // Target sends to actor he accepted the follow request | 85 | // Target sends to actor he accepted the follow request |
86 | if (actorFollow.state === 'accepted') { | 86 | if (actorFollow.state === 'accepted') { |
87 | await sendAccept(actorFollow) | 87 | sendAccept(actorFollow) |
88 | await autoFollowBackIfNeeded(actorFollow) | 88 | |
89 | await autoFollowBackIfNeeded(actorFollow, t) | ||
89 | } | 90 | } |
90 | 91 | ||
91 | return { actorFollow, created, isFollowingInstance, targetActor } | 92 | return { actorFollow, created, isFollowingInstance, targetActor } |