From a6b26afc561703cc343f8962906734324b8c2d0c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Oct 2022 13:27:22 +0200 Subject: Fix channel follow with manually approved follower --- server/lib/activitypub/process/process-follow.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib/activitypub') diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts index da660bda3..7def753d5 100644 --- a/server/lib/activitypub/process/process-follow.ts +++ b/server/lib/activitypub/process/process-follow.ts @@ -47,7 +47,7 @@ async function processFollow (byActor: MActorSignature, activityId: string, targ byActor, targetActor, activityId, - state: CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL + state: await isFollowingInstance(targetActor) && CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL ? 'pending' : 'accepted', transaction: t @@ -134,7 +134,7 @@ async function acceptIfNeeded (actorFollow: MActorFollow, targetActor: MActorFul // Or if the instance automatically accepts followers if (actorFollow.state === 'accepted') return if (!await isFollowingInstance(targetActor)) return - if (CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === true) return + if (CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === true && await isFollowingInstance(targetActor)) return actorFollow.state = 'accepted' -- cgit v1.2.3