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

[omemo] Fix device_id migration

parent 7783864f
......@@ -241,6 +241,19 @@ class LiteAxolotlStore(AxolotlStore):
END TRANSACTION;
""" % move)
if self.user_version() < 7:
# Convert old device ids to integer
convert = """
UPDATE secret SET device_id = device_id % 2147483646;
"""
self._con.executescript(
""" BEGIN TRANSACTION;
%s
PRAGMA user_version=7;
END TRANSACTION;
""" % convert)
def loadSignedPreKey(self, signedPreKeyId):
query = 'SELECT record FROM signed_prekeys WHERE prekey_id = ?'
result = self._con.execute(query, (signedPreKeyId, )).fetchone()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment