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 @@ class Chatstate(BaseModule): ...@@ -137,16 +137,14 @@ class Chatstate(BaseModule):
account=self._account, account=self._account,
contact=contact)) contact=contact))
def _process_chatstate(self, _con, stanza, properties): def _process_chatstate(self, _con, _stanza, properties):
if not properties.has_chatstate: if not properties.has_chatstate:
return return
if (properties.is_self_message or if (properties.is_self_message or
properties.type.is_groupchat or properties.type.is_groupchat or
properties.is_mam_message or
properties.is_carbon_message and properties.carbon.is_sent): properties.is_carbon_message and properties.carbon.is_sent):
if properties.chatstate in ('inactive', 'gone',
'composing', 'paused'):
raise nbxmpp.NodeProcessed
return return
if properties.is_muc_pm: if properties.is_muc_pm:
...@@ -167,15 +165,6 @@ class Chatstate(BaseModule): ...@@ -167,15 +165,6 @@ class Chatstate(BaseModule):
account=self._account, account=self._account,
contact=contact)) 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 @ensure_enabled
def _check_last_interaction(self) -> GLib.SOURCE_CONTINUE: def _check_last_interaction(self) -> GLib.SOURCE_CONTINUE:
now = time.time() 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