Hide note from dynamicresponse in filteractions, and make seen default to true

indiachan-spamvector
Thomas Lynch 2 years ago
parent b69337e2f1
commit 78bd713274
  1. 3
      lib/post/filteractions.js

@ -37,12 +37,13 @@ module.exports = async (req, res, hitGlobalFilter, hitLocalFilter, boardFilterMo
'allowAppeal': hitGlobalFilter ? filterBanAppealable : true,
'showUser': true,
'note': `${hitGlobalFilter ? 'global ' :''}filter hit: "${hitGlobalFilter || hitLocalFilter}"`,
'seen': false,
'seen': true,
};
const insertedResult = await Bans.insertOne(ban);
//add and delete some props for the dynamic response
ban._id = insertedResult.insertedId;
ban.ip.raw = null;
ban.note = null;
return dynamicResponse(req, res, 403, 'ban', {
bans: [ban]
});

Loading…
Cancel
Save