aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-19 13:55:00 +0100
committerChocobozzz <me@florianbigard.com>2021-02-19 13:55:00 +0100
commit4cbdcf440969de2bd0c0cac3dad53d582879465e (patch)
treed66029e2cd3e79c96001d3474307f0219cdd388a /server/lib
parent07f81d9deedf4921b8518c2d2b16043167b4c5d5 (diff)
downloadPeerTube-4cbdcf440969de2bd0c0cac3dad53d582879465e.tar.gz
PeerTube-4cbdcf440969de2bd0c0cac3dad53d582879465e.tar.zst
PeerTube-4cbdcf440969de2bd0c0cac3dad53d582879465e.zip
Fix sending accept to old follows
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/process/process-follow.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts
index 076ad9cf4..38d684512 100644
--- a/server/lib/activitypub/process/process-follow.ts
+++ b/server/lib/activitypub/process/process-follow.ts
@@ -69,6 +69,13 @@ async function processFollow (byActor: MActorSignature, activityId: string, targ
69 // Or if the instance automatically accepts followers 69 // Or if the instance automatically accepts followers
70 if (actorFollow.state !== 'accepted' && (isFollowingInstance === false || CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === false)) { 70 if (actorFollow.state !== 'accepted' && (isFollowingInstance === false || CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === false)) {
71 actorFollow.state = 'accepted' 71 actorFollow.state = 'accepted'
72
73 await actorFollow.save({ transaction: t })
74 }
75
76 // Before PeerTube V3 we did not save the follow ID. Try to fix these old follows
77 if (!actorFollow.url) {
78 actorFollow.url = activityId
72 await actorFollow.save({ transaction: t }) 79 await actorFollow.save({ transaction: t })
73 } 80 }
74 81