PeerTube/server/lib/activitypub/fetch.ts

16 lines
545 B
TypeScript
Raw Normal View History

2017-11-22 03:29:55 -06:00
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
}