diff options
Diffstat (limited to 'server/lib/activitypub/outbox.ts')
-rw-r--r-- | server/lib/activitypub/outbox.ts | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/server/lib/activitypub/outbox.ts b/server/lib/activitypub/outbox.ts deleted file mode 100644 index 5eef76871..000000000 --- a/server/lib/activitypub/outbox.ts +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
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' | ||
5 | |||
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!') | ||
11 | return undefined | ||
12 | } | ||
13 | |||
14 | const payload = { | ||
15 | uri: actor.outboxUrl, | ||
16 | type: 'activity' as 'activity' | ||
17 | } | ||
18 | |||
19 | return JobQueue.Instance.createJobAsync({ type: 'activitypub-http-fetcher', payload }) | ||
20 | } | ||
21 | |||
22 | export { | ||
23 | addFetchOutboxJob | ||
24 | } | ||