PeerTube/server/lib/activitypub/fetch.ts

16 lines
492 B
TypeScript
Raw Normal View History

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