From e3bb78a2134a5e5755b6dbd8987894572ca31269 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 23 Feb 2018 16:08:32 +0100 Subject: [PATCH] Fix lint --- server/lib/activitypub/fetch.ts | 2 +- server/middlewares/validators/activitypub/activity.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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() -- 2.25.1