Closed andyUA closed 8 years ago
moderation - is a regular javascript function, which if returns true - the post is visible, if returns false the post is hidden. So you can design this function in whatever fashion you feel comfortable. You might consider using arrays.
moderation: function(content) {
allow = true;
if (content.text) {
var keywords = ["bad word1", "bad word2", "bad word3"];
for (var i = 0; i < keywords.length && allow; i++) {
if (content.text.indexOf(keywords[i]) != -1) {
allow = false;
}
}
}
return allow;
}
How to add more than one word in moderation filter?