aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/fetch.ts
blob: 4fc97cc3863317e303b7342564b156f7901a33f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { Transaction } from 'sequelize'
import { ActorModel } from '../../models/activitypub/actor'
import { activitypubHttpJobScheduler, ActivityPubHttpPayload } from '../jobs/activitypub-http-job-scheduler'

async function addFetchOutboxJob (actor: ActorModel, t: Transaction) {
  const jobPayload: ActivityPubHttpPayload = {
    uris: [ actor.outboxUrl ]
  }

  return activitypubHttpJobScheduler.createJob(t, 'activitypubHttpFetcherHandler', jobPayload)
}

export {
  addFetchOutboxJob
}