From b59056fd161a8c90010fb798ccf3e6ab173b0d2f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 13 Aug 2022 11:24:56 +0200 Subject: [PATCH] fix muting --- files/helpers/regex.py | 2 +- files/routes/chat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 70ebbd0c0..cbb9ad999 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -43,7 +43,7 @@ sub_regex = re.compile('(^|\s|

)\/?(h\/(\w|-){3,25})(?![^<]*<\/(code|pre|a)>)' strikethrough_regex = re.compile('(^|\s|>)~{1,2}([^~]+)~{1,2}', flags=re.A) -mute_regex = re.compile("/mute @([a-z0-9_\-]{3,25}) ([0-9])+", flags=re.A) +mute_regex = re.compile("\/mute @([a-z0-9_\-]{3,25}) ([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'(? 1: text = text.lower() for i in mute_regex.finditer(text): - username = i.group(1) + username = i.group(1).lower() duration = int(int(i.group(2)) * 60 + time.time()) muted[username] = duration