From cfa93b915036391ba5f9b8a3e0f329f720df3998 Mon Sep 17 00:00:00 2001 From: QuickMythril Date: Tue, 28 Jan 2025 00:32:19 -0500 Subject: [PATCH] add spammer list and hide spam comments --- assets/js/MinterBoard.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/js/MinterBoard.js b/assets/js/MinterBoard.js index a600d72..54305d4 100644 --- a/assets/js/MinterBoard.js +++ b/assets/js/MinterBoard.js @@ -8,7 +8,7 @@ const MIN_ADMIN_YES_VOTES = 9; const GROUP_APPROVAL_FEATURE_TRIGGER_HEIGHT = 2012800 //TODO update this to correct featureTrigger height when known, either that, or pull from core. let featureTriggerPassed = false let isApproved = false - +const spamNames = ["Exorcist"] const loadMinterBoardPage = async () => { // Clear existing content on the page @@ -1021,6 +1021,11 @@ const displayComments = async (cardIdentifier) => { const commentHTMLArray = await Promise.all( comments.map(async (comment) => { try { + // If the name of the commenter is in the "spamNames" array, return null + if (spamNames.includes(comment.name)) { + console.warn(`Commenter ${comment.name} is in the spamNames array, skipping...`) + return null + } const commentDataResponse = await qortalRequest({ action: "FETCH_QDN_RESOURCE", name: comment.name,