diff options
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/fetch.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/lib/activitypub/fetch.ts b/server/lib/activitypub/fetch.ts index b1b370a1a..549791f14 100644 --- a/server/lib/activitypub/fetch.ts +++ b/server/lib/activitypub/fetch.ts | |||
@@ -1,7 +1,16 @@ | |||
1 | import { logger } from '../../helpers/logger' | ||
2 | import { getServerActor } from '../../helpers/utils' | ||
1 | import { ActorModel } from '../../models/activitypub/actor' | 3 | import { ActorModel } from '../../models/activitypub/actor' |
2 | import { JobQueue } from '../job-queue' | 4 | import { JobQueue } from '../job-queue' |
3 | 5 | ||
4 | async function addFetchOutboxJob (actor: ActorModel) { | 6 | async function addFetchOutboxJob (actor: ActorModel) { |
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 | ||
12 | } | ||
13 | |||
5 | const payload = { | 14 | const payload = { |
6 | uris: [ actor.outboxUrl ] | 15 | uris: [ actor.outboxUrl ] |
7 | } | 16 | } |