aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/fetch.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/fetch.ts')
-rw-r--r--server/lib/activitypub/fetch.ts9
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 @@
1import { logger } from '../../helpers/logger'
2import { getServerActor } from '../../helpers/utils'
1import { ActorModel } from '../../models/activitypub/actor' 3import { ActorModel } from '../../models/activitypub/actor'
2import { JobQueue } from '../job-queue' 4import { JobQueue } from '../job-queue'
3 5
4async function addFetchOutboxJob (actor: ActorModel) { 6async 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 }