allow ppl to link discord media in DMs

master
Aevann1 2022-11-09 21:33:16 +02:00
parent 170959c071
commit 0060a326d7
1 changed files with 2 additions and 2 deletions

View File

@ -428,7 +428,7 @@ def message2(v, username):
message = sanitize_raw_body(request.values.get("message"), False)
if not message: abort(400, "Message is empty!")
if 'linkedin.com' in message: abort(403, "This domain 'linkedin.com' is banned.")
if v.id != AEVANN_ID and ('discord.gg' in message or 'discord.com' in message or 'discordapp.com' in message):
if v.id != AEVANN_ID and ('discord.gg' in message or 'discord.com/invite/' in message or 'discordapp.com/invite/' in message):
abort(403, "Stop grooming!")
body_html = sanitize(message)
@ -484,7 +484,7 @@ def messagereply(v):
if 'linkedin.com' in body: abort(403, "This domain 'linkedin.com' is banned")
if v.id != AEVANN_ID and ('discord.gg' in body or 'discord.com' in body or 'discordapp.com' in body):
if v.id != AEVANN_ID and ('discord.gg' in body or 'discord.com/invite/' in body or 'discordapp.com/invite/' in body):
abort(403, "Stop grooming!")
id = request.values.get("parent_id")