PeerTube/server/lib/activitypub/fetch.ts

16 lines
492 B
TypeScript
Raw Normal View History

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