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 @@ def _presence_received(self,
account=self._account,
contact=contact))
def _process_chatstate(self, _con, _stanza, properties):
def _process_chatstate(self, _con, stanza, properties):
if not properties.has_chatstate:
return
......@@ -168,7 +168,13 @@ def _process_chatstate(self, _con, _stanza, properties):
contact=contact))
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')
self._log.warning(stanza)
@ensure_enabled
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