add spammer list and hide spam comments
This commit is contained in:
parent
13987b1fe9
commit
371d93b75f
@ -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
|
||||
@ -1118,6 +1118,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,
|
||||
|
Loading…
Reference in New Issue
Block a user