mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Fetch outbox to grab old activities tests
This commit is contained in:
parent
c986175d68
commit
c46edbc2f6
11 changed files with 81 additions and 30 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue