Improve handling of OMEMO messages by extracting string from message body.
This commit is contained in:
parent
26185f96d7
commit
f3f58244e8
1 changed files with 3 additions and 6 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue