diff --git a/controllers/forms.js b/controllers/forms.js index 784f50ea..ee24cde7 100644 --- a/controllers/forms.js +++ b/controllers/forms.js @@ -250,8 +250,8 @@ router.post('/board/:board/post', Boards.exists, banCheck, postFiles, paramConve if (flood) { deleteTempFiles(req).catch(e => console.error); return res.status(429).render('message', { - 'title': 'Too many requests', - 'message': 'Flood detected', + 'title': 'Flood detected', + 'message': 'Please wait before making another post, or a post similar to another user', 'redirect': `/${req.params.board}${req.body.thread ? '/thread/' + req.body.thread + '.html' : ''}` }); } diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index b4670b35..27476034 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -110,11 +110,6 @@ object { align-items: center; } -.navbar { - border-bottom: 1px solid #a9a9a9; - background: #d6daf0; -} - .catalog-tile { padding: 5px; margin: 2px; @@ -450,7 +445,7 @@ textarea { .post-container.op { background: none; - border: none; + border-color: transparent; width: 100%; } @@ -520,8 +515,6 @@ textarea { flex-shrink: 0; margin-top: auto; line-height: 30px; - border-top: 1px solid #a9a9a9; - background: #d6daf0; } input[type="text"], input[type="submit"], input[type="password"], input[type="file"], textarea { diff --git a/helpers/checks/spamcheck.js b/helpers/checks/spamcheck.js index 7458ce53..7d434c27 100644 --- a/helpers/checks/spamcheck.js +++ b/helpers/checks/spamcheck.js @@ -20,14 +20,14 @@ module.exports = async (req, res) => { const contentOr = []; if (res.locals.numFiles > 0) { contentOr.push({ - 'files': { + 'files': { '$elemMatch': { - 'hash': { //any file hash will match, doesnt need to be all - '$in': req.files.file.map(f => f.sha256) - } + 'hash': { //any file hash will match, doesnt need to be all + '$in': req.files.file.map(f => f.sha256) + } } - } - }); + } + }); } if (req.body.message) { contentOr.push({ @@ -58,8 +58,8 @@ module.exports = async (req, res) => { }) let flood = await Posts.db.find({ - '$or': ors - }).toArray(); + '$or': ors + }).toArray(); return flood.length > 0; diff --git a/models/forms/makepost.js b/models/forms/makepost.js index 13f04e02..14415616 100644 --- a/models/forms/makepost.js +++ b/models/forms/makepost.js @@ -304,6 +304,7 @@ console.log(`NEW POST -> ${successRedirect}`); } else { //new thread, prunes any old threads before rebuilds const prunedThreads = await Posts.pruneOldThreads(req.params.board, res.locals.board.settings.threadLimit); +//TODO: could add early404 here alongside thread pruning. if (prunedThreads.length > 0) { await deletePosts(prunedThreads, req.params.board); }