2017-11-22 04:29:55 -05:00
|
|
|
import { Transaction } from 'sequelize'
|
2017-12-14 11:38:41 -05:00
|
|
|
import { ActorModel } from '../../models/activitypub/actor'
|
2017-12-12 11:53:50 -05:00
|
|
|
import { activitypubHttpJobScheduler, ActivityPubHttpPayload } from '../jobs/activitypub-http-job-scheduler'
|
2017-11-22 04:29:55 -05:00
|
|
|
|
2017-12-14 11:38:41 -05:00
|
|
|
async function addFetchOutboxJob (actor: ActorModel, t: Transaction) {
|
2017-11-22 04:29:55 -05:00
|
|
|
const jobPayload: ActivityPubHttpPayload = {
|
2017-12-14 11:38:41 -05:00
|
|
|
uris: [ actor.outboxUrl ]
|
2017-11-22 04:29:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return activitypubHttpJobScheduler.createJob(t, 'activitypubHttpFetcherHandler', jobPayload)
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
addFetchOutboxJob
|
|
|
|
}
|