diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-22 16:25:03 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | 40ff57078e15d5b86ee6b71e198b95d3feb78eaf (patch) | |
tree | 88031d4eac6a26597e8a1f2fc63674664e3eae26 /server/lib/activitypub/process/process-follow.ts | |
parent | c46edbc2f6ca310b2f0331f979ac6caf27f6eb92 (diff) | |
download | PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.tar.gz PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.tar.zst PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.zip |
Federate video views
Diffstat (limited to 'server/lib/activitypub/process/process-follow.ts')
-rw-r--r-- | server/lib/activitypub/process/process-follow.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts index 248004226..320dc1138 100644 --- a/server/lib/activitypub/process/process-follow.ts +++ b/server/lib/activitypub/process/process-follow.ts | |||
@@ -49,6 +49,12 @@ async function follow (account: AccountInstance, targetAccountURL: string) { | |||
49 | }, | 49 | }, |
50 | transaction: t | 50 | transaction: t |
51 | }) | 51 | }) |
52 | |||
53 | if (accountFollow.state !== 'accepted') { | ||
54 | accountFollow.state = 'accepted' | ||
55 | await accountFollow.save({ transaction: t }) | ||
56 | } | ||
57 | |||
52 | accountFollow.AccountFollower = account | 58 | accountFollow.AccountFollower = account |
53 | accountFollow.AccountFollowing = targetAccount | 59 | accountFollow.AccountFollowing = targetAccount |
54 | 60 | ||