plugin XEP-0384: removed _purgeOldData temporary hack, it should not be useful anymore
This commit is contained in:
parent
fe2e5dd8ce
commit
c6d26678ae
1 changed files with 0 additions and 16 deletions
|
|
@ -537,27 +537,11 @@ class OMEMO(object):
|
||||||
|
|
||||||
defer.returnValue(xmlui)
|
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
|
@defer.inlineCallbacks
|
||||||
def profileConnected(self, client):
|
def profileConnected(self, client):
|
||||||
client._xep_0384_ready = defer.Deferred()
|
client._xep_0384_ready = defer.Deferred()
|
||||||
# we first need to get devices ids (including our own)
|
# we first need to get devices ids (including our own)
|
||||||
persistent_dict = persistent.LazyPersistentBinaryDict("XEP-0384", client.profile)
|
persistent_dict = persistent.LazyPersistentBinaryDict("XEP-0384", client.profile)
|
||||||
yield self._purgeOldData(client, persistent_dict)
|
|
||||||
# all known devices of profile
|
# all known devices of profile
|
||||||
devices = yield self.getDevices(client)
|
devices = yield self.getDevices(client)
|
||||||
# and our own device id
|
# and our own device id
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue