plugin XEP-0384: removed _purgeOldData temporary hack, it should not be useful anymore

This commit is contained in:
Goffi 2019-03-01 12:17:34 +01:00
commit c6d26678ae

View file

@ -537,27 +537,11 @@ class OMEMO(object):
defer.returnValue(xmlui)
@defer.inlineCallbacks
def _purgeOldData(self, client, persistent_dict):
# FIXME: temporary method to deal with data change in omemo module
# We remove the old data, which is acceptable as
# no release of SàT (beside alpha versions) has been done
# since this data has been used.
# /!\ this method must be removed before 0.7 release /!\
log.warning(u"FIXME: Using temporary purgeOldData code, to be removed before 0.7 release.")
state = yield persistent_dict.get(KEY_STATE)
if state and "version" not in state:
log.info(u"Old data found, purging it")
self.host.memory.storage.delPrivateNamespace("XEP-0384", binary=True,
profile=client.profile)
@defer.inlineCallbacks
def profileConnected(self, client):
client._xep_0384_ready = defer.Deferred()
# we first need to get devices ids (including our own)
persistent_dict = persistent.LazyPersistentBinaryDict("XEP-0384", client.profile)
yield self._purgeOldData(client, persistent_dict)
# all known devices of profile
devices = yield self.getDevices(client)
# and our own device id