From f3f58244e815a205826f3026c3346c841221a4e1 Mon Sep 17 00:00:00 2001 From: "Schimon Jehudah, Adv." Date: Thu, 12 Sep 2024 16:06:05 +0300 Subject: [PATCH] Improve handling of OMEMO messages by extracting string from message body. --- slixfeed/xmpp/chat.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/slixfeed/xmpp/chat.py b/slixfeed/xmpp/chat.py index 1ccfab1..7087ff4 100644 --- a/slixfeed/xmpp/chat.py +++ b/slixfeed/xmpp/chat.py @@ -159,13 +159,10 @@ class XmppChat: else: omemo_decrypted = None - if message_type == 'groupchat': - command = command[1:] + if message_type == 'groupchat': command = command[1:] + if isinstance(command, Message): command = command['body'] - if isinstance(command, str): - command_lowercase = command.lower() - elif isinstance(command, Message): - command_lowercase = command['body'].lower() + command_lowercase = command.lower() # This is a work-around to empty messages that are caused by function # self.register_handler(CoroutineCallback( of module client.py.