diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-22 11:27:40 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | c46edbc2f6ca310b2f0331f979ac6caf27f6eb92 (patch) | |
tree | 073e32adb1bf93a597a269432e33a8f28365deb5 /server/lib/activitypub | |
parent | c986175d68a18e96fbd41537a05c7796a2c64f38 (diff) | |
download | PeerTube-c46edbc2f6ca310b2f0331f979ac6caf27f6eb92.tar.gz PeerTube-c46edbc2f6ca310b2f0331f979ac6caf27f6eb92.tar.zst PeerTube-c46edbc2f6ca310b2f0331f979ac6caf27f6eb92.zip |
Fetch outbox to grab old activities tests
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/process/process-accept.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-add.ts | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/activitypub/process/process-accept.ts b/server/lib/activitypub/process/process-accept.ts index e159c41b5..73c6cb279 100644 --- a/server/lib/activitypub/process/process-accept.ts +++ b/server/lib/activitypub/process/process-accept.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { ActivityAccept } from '../../../../shared/models/activitypub/activity' | 1 | import { ActivityAccept } from '../../../../shared/models/activitypub/activity' |
2 | import { database as db } from '../../../initializers' | 2 | import { database as db } from '../../../initializers' |
3 | import { AccountInstance } from '../../../models/account/account-interface' | 3 | import { AccountInstance } from '../../../models/account/account-interface' |
4 | import { addFetchOutboxJob } from '../fetch' | ||
4 | 5 | ||
5 | async function processAcceptActivity (activity: ActivityAccept, inboxAccount?: AccountInstance) { | 6 | async function processAcceptActivity (activity: ActivityAccept, inboxAccount?: AccountInstance) { |
6 | if (inboxAccount === undefined) throw new Error('Need to accept on explicit inbox.') | 7 | if (inboxAccount === undefined) throw new Error('Need to accept on explicit inbox.') |
@@ -24,4 +25,5 @@ async function processAccept (account: AccountInstance, targetAccount: AccountIn | |||
24 | 25 | ||
25 | follow.set('state', 'accepted') | 26 | follow.set('state', 'accepted') |
26 | await follow.save() | 27 | await follow.save() |
28 | await addFetchOutboxJob(targetAccount, undefined) | ||
27 | } | 29 | } |
diff --git a/server/lib/activitypub/process/process-add.ts b/server/lib/activitypub/process/process-add.ts index edc90dee5..332c18cc0 100644 --- a/server/lib/activitypub/process/process-add.ts +++ b/server/lib/activitypub/process/process-add.ts | |||
@@ -48,7 +48,7 @@ function addRemoteVideo (account: AccountInstance, | |||
48 | activity: ActivityAdd, | 48 | activity: ActivityAdd, |
49 | videoChannel: VideoChannelInstance, | 49 | videoChannel: VideoChannelInstance, |
50 | videoToCreateData: VideoTorrentObject) { | 50 | videoToCreateData: VideoTorrentObject) { |
51 | logger.debug('Adding remote video %s.', videoToCreateData.url) | 51 | logger.debug('Adding remote video %s.', videoToCreateData.id) |
52 | 52 | ||
53 | return db.sequelize.transaction(async t => { | 53 | return db.sequelize.transaction(async t => { |
54 | const sequelizeOptions = { | 54 | const sequelizeOptions = { |