Philipp Hörist pushed to branch master at gajim / gajim
Commits:
ac4bde04 by Philipp Hörist at 2019-05-15T18:12:41Z
MAM: Always reset state on reconnect
It was not reset if the previous MAM query was interrupted because of a
disconnect
- - - - -
2 changed files:
- gajim/common/connection.py
- gajim/common/modules/mam.py
Changes:
=====================================
gajim/common/connection.py
=====================================
@@ -1346,6 +1346,7 @@ class Connection(CommonConnection, ConnectionHandlers):
self._discover_server()
self._set_send_timeouts()
self.get_module('Chatstate').enabled = True
+ self.get_module('MAM').reset_state()
def _set_send_timeouts(self):
if app.config.get_per('accounts', self.name, 'keep_alives_enabled'):
=====================================
gajim/common/modules/mam.py
=====================================
@@ -68,6 +68,10 @@ class MAM(BaseModule):
account=self._account,
feature=self.archiving_namespace))
+ def reset_state(self):
+ self._mam_query_ids.clear()
+ self._catch_up_finished.clear()
+
def _from_valid_archive(self, _stanza, properties):
if properties.type.is_groupchat:
expected_archive = properties.jid
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/ac4bde0447a5553d6a2515a8eac664806ccce03a
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/ac4bde0447a5553d6a2515a8eac664806ccce03a
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits