1
0
Fork 0
peertube/server/lib/activitypub/fetch.ts
2017-12-19 10:53:16 +01:00

15 lines
492 B
TypeScript

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