aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-11 13:27:22 +0200
committerChocobozzz <me@florianbigard.com>2022-10-11 13:27:22 +0200
commita6b26afc561703cc343f8962906734324b8c2d0c (patch)
treeb6ab129896a0a7225ff7648c2c56b15154c445d5 /server/lib
parent1593e0dd5c822d7f8d6b87048db5de4184c4f93c (diff)
downloadPeerTube-a6b26afc561703cc343f8962906734324b8c2d0c.tar.gz
PeerTube-a6b26afc561703cc343f8962906734324b8c2d0c.tar.zst
PeerTube-a6b26afc561703cc343f8962906734324b8c2d0c.zip
Fix channel follow with manually approved follower
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/process/process-follow.ts4
1 files changed, 2 insertions, 2 deletions
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
47 byActor, 47 byActor,
48 targetActor, 48 targetActor,
49 activityId, 49 activityId,
50 state: CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL 50 state: await isFollowingInstance(targetActor) && CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL
51 ? 'pending' 51 ? 'pending'
52 : 'accepted', 52 : 'accepted',
53 transaction: t 53 transaction: t
@@ -134,7 +134,7 @@ async function acceptIfNeeded (actorFollow: MActorFollow, targetActor: MActorFul
134 // Or if the instance automatically accepts followers 134 // Or if the instance automatically accepts followers
135 if (actorFollow.state === 'accepted') return 135 if (actorFollow.state === 'accepted') return
136 if (!await isFollowingInstance(targetActor)) return 136 if (!await isFollowingInstance(targetActor)) return
137 if (CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === true) return 137 if (CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === true && await isFollowingInstance(targetActor)) return
138 138
139 actorFollow.state = 'accepted' 139 actorFollow.state = 'accepted'
140 140