]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-follow.ts
Correctly forward like/dislikes and undo
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-follow.ts
index 24800422655022151228e0745169d8762e3f96a0..320dc113814f74757c52f6e5fa753bf8f291ead1 100644 (file)
@@ -49,6 +49,12 @@ async function follow (account: AccountInstance, targetAccountURL: string) {
       },
       transaction: t
     })
+
+    if (accountFollow.state !== 'accepted') {
+      accountFollow.state = 'accepted'
+      await accountFollow.save({ transaction: t })
+    }
+
     accountFollow.AccountFollower = account
     accountFollow.AccountFollowing = targetAccount