From 51808b6f40f671005cb2a7c7f982e160f0027b78 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 22 Jan 2023 02:15:07 +0200 Subject: [PATCH] make it possible to mute without @ --- files/helpers/regex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index e32ccd778..2acca2020 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -46,7 +46,7 @@ sub_regex = re.compile('(^|\s|

)\/?(h\/(\w|-){3,25})(?![^<]*<\/(code|pre|a)>)' strikethrough_regex = re.compile('(^|\s|>)~{1,2}([^~]+)~{1,2}(?![^<]*<\/(code|pre|a)>)', flags=re.A) -mute_regex = re.compile("\/mute @([a-z0-9_\-]{3,30}) ([0-9]+)", flags=re.A|re.I) +mute_regex = re.compile("\/mute @?([a-z0-9_\-]{3,30}) ([0-9]+)", flags=re.A|re.I) emoji_regex = re.compile(f"

\s*(:[!#@]{{0,3}}[{valid_username_chars}]+:\s*)+<\/p>", flags=re.A) emoji_regex2 = re.compile(f'(?)', flags=re.A)