Improve handling of OMEMO messages by extracting string from message body.

This commit is contained in:
Schimon Jehudah, Adv. 2024-09-12 16:06:05 +03:00
parent 26185f96d7
commit f3f58244e8

View file

@ -159,13 +159,10 @@ class XmppChat:
else: else:
omemo_decrypted = None omemo_decrypted = None
if message_type == 'groupchat': if message_type == 'groupchat': command = command[1:]
command = command[1:] if isinstance(command, Message): command = command['body']
if isinstance(command, str): command_lowercase = command.lower()
command_lowercase = command.lower()
elif isinstance(command, Message):
command_lowercase = command['body'].lower()
# This is a work-around to empty messages that are caused by function # This is a work-around to empty messages that are caused by function
# self.register_handler(CoroutineCallback( of module client.py. # self.register_handler(CoroutineCallback( of module client.py.