projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c5fbed
)
Correctly fix auto follows
author
Chocobozzz
<me@florianbigard.com>
Mon, 17 Feb 2020 14:44:06 +0000
(15:44 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Mon, 17 Feb 2020 14:44:06 +0000
(15:44 +0100)
server/lib/activitypub/process/process-follow.ts
patch
|
blob
|
history
diff --git
a/server/lib/activitypub/process/process-follow.ts
b/server/lib/activitypub/process/process-follow.ts
index 0b98d4af2b379558bde6b19accb3945217ef8ae5..db7fb85684fb22d03676d6516149ab95a198e0c8 100644
(file)
--- a/
server/lib/activitypub/process/process-follow.ts
+++ b/
server/lib/activitypub/process/process-follow.ts
@@
-59,7
+59,9
@@
async function processFollow (byActor: MActorSignature, targetActorURL: string)
transaction: t
})
- if (actorFollow.state !== 'accepted' && isFollowingInstance && 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 })
}