No links are allowed. Not even domain names. :)
This commit is contained in:
parent
b14a6dbed4
commit
bea24e50b0
@ -66,7 +66,9 @@ exports.addPost = async (post) => {
|
||||
return reject("empty message");
|
||||
|
||||
if (post.message.includes("</a>"))
|
||||
return reject("spam");
|
||||
return reject("links are not allowed");
|
||||
if (post.message.match(/(https?)?(:\/\/)?\S+( +)?(\.|\(?dot\)?)( +)?\S+(( +)?\/.+)?/gmi))
|
||||
return reject("links are not allowed");
|
||||
|
||||
if (post.name === undefined || post.name === "")
|
||||
post.name = "Anonymous";
|
||||
|
Loading…
Reference in New Issue
Block a user