2017-11-22 03:29:55 -06:00
|
|
|
import { Transaction } from 'sequelize'
|
2017-12-12 10:53:50 -06:00
|
|
|
import { AccountModel } from '../../models/account/account'
|
|
|
|
import { activitypubHttpJobScheduler, ActivityPubHttpPayload } from '../jobs/activitypub-http-job-scheduler'
|
2017-11-22 03:29:55 -06:00
|
|
|
|
2017-12-12 10:53:50 -06:00
|
|
|
async function addFetchOutboxJob (account: AccountModel, t: Transaction) {
|
2017-11-22 03:29:55 -06:00
|
|
|
const jobPayload: ActivityPubHttpPayload = {
|
|
|
|
uris: [ account.outboxUrl ]
|
|
|
|
}
|
|
|
|
|
|
|
|
return activitypubHttpJobScheduler.createJob(t, 'activitypubHttpFetcherHandler', jobPayload)
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
addFetchOutboxJob
|
|
|
|
}
|