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

Chatstates: Never stop message processing inside that module

Clients adding chatstates should not disrupt Gajim
parent bfc49cbf
......@@ -137,16 +137,14 @@ 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
if (properties.is_self_message or
properties.type.is_groupchat or
properties.is_mam_message or
properties.is_carbon_message and properties.carbon.is_sent):
if properties.chatstate in ('inactive', 'gone',
'composing', 'paused'):
raise nbxmpp.NodeProcessed
return
if properties.is_muc_pm:
......@@ -167,15 +165,6 @@ def _process_chatstate(self, _con, stanza, properties):
account=self._account,
contact=contact))
if properties.chatstate in ('inactive', 'gone', 'composing', 'paused'):
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:
now = time.time()
......
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