aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-22 10:29:55 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commitc986175d68a18e96fbd41537a05c7796a2c64f38 (patch)
treee8a8a02abb57e637451afbf3b1b0e7a0dbd4206c /server/controllers/api
parente71bcc0f4b31ecfd84a786411febfc6d18a85258 (diff)
downloadPeerTube-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.ts3
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'
19import { AccountInstance } from '../../../models/account/account-interface' 19import { AccountInstance } from '../../../models/account/account-interface'
20import { retryTransactionWrapper } from '../../../helpers/database-utils' 20import { retryTransactionWrapper } from '../../../helpers/database-utils'
21import { saveAccountAndServerIfNotExist } from '../../../lib/activitypub/account' 21import { saveAccountAndServerIfNotExist } from '../../../lib/activitypub/account'
22import { addFetchOutboxJob } from '../../../lib/activitypub/fetch'
22 23
23const serverFollowsRouter = express.Router() 24const 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