diff --git a/server/lib/activitypub/fetch.ts b/server/lib/activitypub/fetch.ts index 549791f14..a8eefff80 100644 --- a/server/lib/activitypub/fetch.ts +++ b/server/lib/activitypub/fetch.ts @@ -8,7 +8,7 @@ async function addFetchOutboxJob (actor: ActorModel) { const serverActor = await getServerActor() if (serverActor.id === actor.id) { logger.error('Cannot fetch our own outbox!') - return + return undefined } const payload = { diff --git a/server/middlewares/validators/activitypub/activity.ts b/server/middlewares/validators/activitypub/activity.ts index 15e8bb079..8c2920328 100644 --- a/server/middlewares/validators/activitypub/activity.ts +++ b/server/middlewares/validators/activitypub/activity.ts @@ -18,7 +18,7 @@ const activityPubValidator = [ const remoteActor = res.locals.signature.actor as ActorModel if (serverActor.id === remoteActor.id) { logger.error('Receiving request in INBOX by ourselves!', req.body) - return res.sendStatus(409) + return res.status(409).end() } return next()