Skip to content
Snippets Groups Projects
Commit ac4bde04 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

MAM: Always reset state on reconnect

It was not reset if the previous MAM query was interrupted because of a disconnect
parent 03917eda
No related branches found
No related tags found
No related merge requests found
......@@ -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'):
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment