From 4eb4cb17377c575f8272be567d764435f00ea1d9 Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Fri, 18 Feb 2022 03:41:09 +1100 Subject: [PATCH] minor bugfix, moveposts error --- models/forms/moveposts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/forms/moveposts.js b/models/forms/moveposts.js index 290b2192..450ee6a9 100644 --- a/models/forms/moveposts.js +++ b/models/forms/moveposts.js @@ -121,13 +121,13 @@ module.exports = async (req, res) => { const remarkupPosts = await Posts.globalGetPosts([...backlinkRebuilds]); await Promise.all(remarkupPosts.map(async post => { //doing these all at once const postUpdate = {}; + //update post message and/or id if (post.userId) { let userId = createHash('sha256').update(res.locals.destinationThread.salt + post.ip.raw).digest('hex'); userId = userId.substring(userId.length-6); postUpdate.userId = userId; } - //update post message and/or id - if (post.nomarkup && post.nomarkup.length > 0 || post.userId) { + if (post.nomarkup && post.nomarkup.length > 0) { let message = markdown(post.nomarkup); let { quotedMessage, threadQuotes, crossQuotes } = await quoteHandler.process(post.board, message, post.thread); // req.body.move_to_thread); message = sanitize(quotedMessage, sanitizeOptions.after);