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

MAM: Always reset state on reconnect

It was not reset if the previous MAM query was interrupted because of a disconnect
parent 03917eda
Pipeline #3496 passed with stages
in 3 minutes and 21 seconds
...@@ -1346,6 +1346,7 @@ class Connection(CommonConnection, ConnectionHandlers): ...@@ -1346,6 +1346,7 @@ class Connection(CommonConnection, ConnectionHandlers):
self._discover_server() self._discover_server()
self._set_send_timeouts() self._set_send_timeouts()
self.get_module('Chatstate').enabled = True self.get_module('Chatstate').enabled = True
def _set_send_timeouts(self): def _set_send_timeouts(self):
if app.config.get_per('accounts',, 'keep_alives_enabled'): if app.config.get_per('accounts',, 'keep_alives_enabled'):
...@@ -68,6 +68,10 @@ class MAM(BaseModule): ...@@ -68,6 +68,10 @@ class MAM(BaseModule):
account=self._account, account=self._account,
feature=self.archiving_namespace)) feature=self.archiving_namespace))
def reset_state(self):
def _from_valid_archive(self, _stanza, properties): def _from_valid_archive(self, _stanza, properties):
if properties.type.is_groupchat: if properties.type.is_groupchat:
expected_archive = properties.jid expected_archive = properties.jid
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment