]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-follow.ts
Merge branch 'release/2.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-follow.ts
index 85f22d654ebd9611ac7cfb8a7691e3a3d7adb5e2..db7fb85684fb22d03676d6516149ab95a198e0c8 100644 (file)
@@ -59,7 +59,9 @@ async function processFollow (byActor: MActorSignature, targetActorURL: string)
       transaction: t
     })
 
-    if (actorFollow.state !== 'accepted' && CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === false) {
+    // Set the follow as accepted if the remote actor follows a channel or account
+    // Or if the instance automatically accepts followers
+    if (actorFollow.state !== 'accepted' && (isFollowingInstance === false || CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === false)) {
       actorFollow.state = 'accepted'
       await actorFollow.save({ transaction: t })
     }