diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-22 10:29:55 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | c986175d68a18e96fbd41537a05c7796a2c64f38 (patch) | |
tree | e8a8a02abb57e637451afbf3b1b0e7a0dbd4206c /server/controllers/api | |
parent | e71bcc0f4b31ecfd84a786411febfc6d18a85258 (diff) | |
download | PeerTube-c986175d68a18e96fbd41537a05c7796a2c64f38.tar.gz PeerTube-c986175d68a18e96fbd41537a05c7796a2c64f38.tar.zst PeerTube-c986175d68a18e96fbd41537a05c7796a2c64f38.zip |
Fetch outbox to grab old activities
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/server/follows.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/server/follows.ts b/server/controllers/api/server/follows.ts index c759824e0..4b54afc8d 100644 --- a/server/controllers/api/server/follows.ts +++ b/server/controllers/api/server/follows.ts | |||
@@ -19,6 +19,7 @@ import { sendUndoFollow } from '../../../lib/activitypub/send/send-undo' | |||
19 | import { AccountInstance } from '../../../models/account/account-interface' | 19 | import { AccountInstance } from '../../../models/account/account-interface' |
20 | import { retryTransactionWrapper } from '../../../helpers/database-utils' | 20 | import { retryTransactionWrapper } from '../../../helpers/database-utils' |
21 | import { saveAccountAndServerIfNotExist } from '../../../lib/activitypub/account' | 21 | import { saveAccountAndServerIfNotExist } from '../../../lib/activitypub/account' |
22 | import { addFetchOutboxJob } from '../../../lib/activitypub/fetch' | ||
22 | 23 | ||
23 | const serverFollowsRouter = express.Router() | 24 | const serverFollowsRouter = express.Router() |
24 | 25 | ||
@@ -136,6 +137,8 @@ async function follow (fromAccount: AccountInstance, targetAccount: AccountInsta | |||
136 | if (accountFollow.state === 'pending') { | 137 | if (accountFollow.state === 'pending') { |
137 | await sendFollow(accountFollow, t) | 138 | await sendFollow(accountFollow, t) |
138 | } | 139 | } |
140 | |||
141 | await addFetchOutboxJob(targetAccount, t) | ||
139 | }) | 142 | }) |
140 | } catch (err) { | 143 | } catch (err) { |
141 | // Reset target account | 144 | // Reset target account |