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:
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.