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.
|
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 featureTriggerPassed = false
|
||||||
let isApproved = false
|
let isApproved = false
|
||||||
|
const spamNames = ["Exorcist"]
|
||||||
|
|
||||||
const loadMinterBoardPage = async () => {
|
const loadMinterBoardPage = async () => {
|
||||||
// Clear existing content on the page
|
// Clear existing content on the page
|
||||||
@ -1118,6 +1118,11 @@ const displayComments = async (cardIdentifier) => {
|
|||||||
const commentHTMLArray = await Promise.all(
|
const commentHTMLArray = await Promise.all(
|
||||||
comments.map(async (comment) => {
|
comments.map(async (comment) => {
|
||||||
try {
|
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({
|
const commentDataResponse = await qortalRequest({
|
||||||
action: "FETCH_QDN_RESOURCE",
|
action: "FETCH_QDN_RESOURCE",
|
||||||
name: comment.name,
|
name: comment.name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user