MAM: Always reset state on reconnect
It was not reset if the previous MAM query was interrupted because of a disconnect
This commit is contained in:
parent
03917eda66
commit
ac4bde0447
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue