From f6d4d5630e28f956f5e478579fd9bbbcedd576f0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 14 Jun 2024 11:49:25 -0400 Subject: [PATCH] chore: lint --- src/middleware/activitypub.js | 12 +++++++----- src/posts/attachments.js | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/middleware/activitypub.js b/src/middleware/activitypub.js index 1080519183..cacbfb1bcc 100644 --- a/src/middleware/activitypub.js +++ b/src/middleware/activitypub.js @@ -40,11 +40,13 @@ middleware.validate = async function (req, res, next) { // winston.verbose('[middleware/activitypub] Request body check passed.'); // History check - // const seen = await db.isSortedSetMember('activities:datetime', req.body.id); - // if (seen) { - // // winston.verbose(`[middleware/activitypub] Activity already seen, ignoring (${req.body.id}).`); - // return res.sendStatus(200); - // } + /* + const seen = await db.isSortedSetMember('activities:datetime', req.body.id); + if (seen) { + // winston.verbose(`[middleware/activitypub] Activity already seen, ignoring (${req.body.id}).`); + return res.sendStatus(200); + } + */ // Checks the validity of the incoming payload against the sender and rejects on failure const verified = await activitypub.verify(req); diff --git a/src/posts/attachments.js b/src/posts/attachments.js index a012242586..75532f5fc8 100644 --- a/src/posts/attachments.js +++ b/src/posts/attachments.js @@ -27,7 +27,7 @@ Attachments.update = async (pid, attachments) => { hash: [], }; const hashes = []; - attachments.filter(Boolean).forEach(({ _type, mediaType, url, name, width, height }, idx) => { + attachments.filter(Boolean).forEach(({ _type, mediaType, url, name, width, height }) => { if (!url) { // only required property return; }