1
0
Fork 0
peertube/server/lib/activitypub/fetch.ts
2017-11-27 19:40:53 +01:00

15 lines
545 B
TypeScript

import { Transaction } from 'sequelize'
import { AccountInstance } from '../../models/account/account-interface'
import { activitypubHttpJobScheduler, ActivityPubHttpPayload } from '../jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler'
async function addFetchOutboxJob (account: AccountInstance, t: Transaction) {
const jobPayload: ActivityPubHttpPayload = {
uris: [ account.outboxUrl ]
}
return activitypubHttpJobScheduler.createJob(t, 'activitypubHttpFetcherHandler', jobPayload)
}
export {
addFetchOutboxJob
}