blob: a8eefff80a916e472f7772d260f9144f31b14f84 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import { logger } from '../../helpers/logger'
import { getServerActor } from '../../helpers/utils'
import { ActorModel } from '../../models/activitypub/actor'
import { JobQueue } from '../job-queue'
async function addFetchOutboxJob (actor: ActorModel) {
// Don't fetch ourselves
const serverActor = await getServerActor()
if (serverActor.id === actor.id) {
logger.error('Cannot fetch our own outbox!')
return undefined
}
const payload = {
uris: [ actor.outboxUrl ]
}
return JobQueue.Instance.createJob({ type: 'activitypub-http-fetcher', payload })
}
export {
addFetchOutboxJob
}
|