From: Chocobozzz Date: Fri, 23 Feb 2018 15:08:32 +0000 (+0100) Subject: Fix lint X-Git-Tag: v0.0.27-alpha~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e3bb78a2134a5e5755b6dbd8987894572ca31269;p=oweals%2Fpeertube.git Fix lint --- 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()