Commit bfc49cbf authored by Philipp Hörist's avatar Philipp Hörist

Don't stop processing messages after receiving non-active chatstate

Some client implement not recommended behavior and send other chatstates
than active including a <body>
parent a298bf1c
......@@ -137,7 +137,7 @@ class Chatstate(BaseModule):
def _process_chatstate(self, _con, _stanza, properties):
def _process_chatstate(self, _con, stanza, properties):
if not properties.has_chatstate:
......@@ -168,7 +168,13 @@ class Chatstate(BaseModule):
if properties.chatstate in ('inactive', 'gone', 'composing', 'paused'):
raise nbxmpp.NodeProcessed
if properties.body is None:
# So we dont lose a message if a client implements not
# recomended behavior
raise nbxmpp.NodeProcessed
self._log.warning('Chatstate with body received')
def _check_last_interaction(self) -> GLib.SOURCE_CONTINUE:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment