chore: lint

This commit is contained in:
Julian Lam
2024-06-14 11:49:25 -04:00
parent 691f691749
commit f6d4d5630e
2 changed files with 8 additions and 6 deletions

View File

@@ -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);

View File

@@ -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;
}