1 import { logger } from '@server/helpers/logger'
2 import { ActorModel } from '@server/models/actor/actor'
3 import { getServerActor } from '@server/models/application/application'
4 import { JobQueue } from '../job-queue'
6 async function addFetchOutboxJob (actor: Pick<ActorModel, 'id' | 'outboxUrl'>) {
7 // Don't fetch ourselves
8 const serverActor = await getServerActor()
9 if (serverActor.id === actor.id) {
10 logger.error('Cannot fetch our own outbox!')
16 type: 'activity' as 'activity'
19 return JobQueue.Instance.createJob({ type: 'activitypub-http-fetcher', payload })