From c46edbc2f6ca310b2f0331f979ac6caf27f6eb92 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 22 Nov 2017 11:27:40 +0100 Subject: Fetch outbox to grab old activities tests --- server/lib/activitypub/process/process-accept.ts | 2 ++ server/lib/activitypub/process/process-add.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'server/lib/activitypub') 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 @@ import { ActivityAccept } from '../../../../shared/models/activitypub/activity' import { database as db } from '../../../initializers' import { AccountInstance } from '../../../models/account/account-interface' +import { addFetchOutboxJob } from '../fetch' async function processAcceptActivity (activity: ActivityAccept, inboxAccount?: AccountInstance) { if (inboxAccount === undefined) throw new Error('Need to accept on explicit inbox.') @@ -24,4 +25,5 @@ async function processAccept (account: AccountInstance, targetAccount: AccountIn follow.set('state', 'accepted') await follow.save() + await addFetchOutboxJob(targetAccount, undefined) } 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, activity: ActivityAdd, videoChannel: VideoChannelInstance, videoToCreateData: VideoTorrentObject) { - logger.debug('Adding remote video %s.', videoToCreateData.url) + logger.debug('Adding remote video %s.', videoToCreateData.id) return db.sequelize.transaction(async t => { const sequelizeOptions = { -- cgit v1.2.3