From eae0365b5c5468e51e9795b0e894815ebda86b4a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 15 Jun 2021 09:17:19 +0200 Subject: Fix missing transactions --- server/lib/activitypub/process/process-follow.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/lib/activitypub/process/process-follow.ts') 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 if (isFollowingInstance && CONFIG.FOLLOWERS.INSTANCE.ENABLED === false) { logger.info('Rejecting %s because instance followers are disabled.', targetActor.url) - await sendReject(activityId, byActor, targetActor) + sendReject(activityId, byActor, targetActor) return { actorFollow: undefined as MActorFollowActors } } @@ -84,8 +84,9 @@ async function processFollow (byActor: MActorSignature, activityId: string, targ // Target sends to actor he accepted the follow request if (actorFollow.state === 'accepted') { - await sendAccept(actorFollow) - await autoFollowBackIfNeeded(actorFollow) + sendAccept(actorFollow) + + await autoFollowBackIfNeeded(actorFollow, t) } return { actorFollow, created, isFollowingInstance, targetActor } -- cgit v1.2.3