Manual approves followers only for the instance
authorChocobozzz <me@florianbigard.com>
Mon, 17 Feb 2020 13:27:29 +0000 (14:27 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 17 Feb 2020 13:27:29 +0000 (14:27 +0100)
And not for accounts or channels of the instance

server/lib/activitypub/process/process-follow.ts

index 85f22d654ebd9611ac7cfb8a7691e3a3d7adb5e2..0b98d4af2b379558bde6b19accb3945217ef8ae5 100644 (file)
@@ -59,7 +59,7 @@ async function processFollow (byActor: MActorSignature, targetActorURL: string)
       transaction: t
     })
 
-    if (actorFollow.state !== 'accepted' && CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === false) {
+    if (actorFollow.state !== 'accepted' && isFollowingInstance && CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === false) {
       actorFollow.state = 'accepted'
       await actorFollow.save({ transaction: t })
     }