check if sed message matches with regex

closes #10
This commit is contained in:
Kaio Cesar 2024-01-08 15:53:50 -03:00
commit e786ed50ae
2 changed files with 2 additions and 1 deletions

View file

@ -229,7 +229,7 @@ class AngelBot(ClientXMPP):
sed.load_string(text)
for message in self.messages[sender]["messages"]:
if sed_args[1] not in message:
if not re.match(sed_args[1], message):
continue
msg = io.StringIO(message)
res = "\n".join(sed.apply(msg, None))