diff --git a/omemo/backend/liteaxolotlstore.py b/omemo/backend/liteaxolotlstore.py index 0e619ad..22a6793 100644 --- a/omemo/backend/liteaxolotlstore.py +++ b/omemo/backend/liteaxolotlstore.py @@ -230,7 +230,7 @@ class LiteAxolotlStore(AxolotlStore): CREATE TABLE IF NOT EXISTS secret ( device_id INTEGER, public_key BLOB, private_key BLOB); INSERT INTO secret (device_id, public_key, private_key) - SELECT registration_id + 1, public_key, private_key + SELECT registration_id + 1, public_key, private_key FROM identities WHERE recipient_id = -1; """ @@ -587,10 +587,11 @@ class LiteAxolotlStore(AxolotlStore): self._con.execute(query, fingerprints) self._con.commit() - def setTrust(self, identityKey, trust): - query = 'UPDATE identities SET trust = ? WHERE public_key = ?' + def setTrust(self, recipient_id, identityKey, trust): + query = '''UPDATE identities SET trust = ? WHERE public_key = ? + AND recipient_id = ?''' public_key = identityKey.getPublicKey().serialize() - self._con.execute(query, (trust, public_key)) + self._con.execute(query, (trust, public_key, recipient_id)) self._con.commit() def isTrusted(self, recipient_id, device_id): diff --git a/omemo/gtk/key.py b/omemo/gtk/key.py index 2d3015a..72191e9 100644 --- a/omemo/gtk/key.py +++ b/omemo/gtk/key.py @@ -296,7 +296,7 @@ class KeyRow(Gtk.ListBoxRow): image.set_tooltip_text(tooltip) backend = self.get_toplevel()._omemo.backend - backend.storage.setTrust(self._identity_key, self.trust) + backend.storage.setTrust(self.jid, self._identity_key, self.trust) @property def active(self): diff --git a/omemo/manifest.ini b/omemo/manifest.ini index 2519eed..6f570ff 100644 --- a/omemo/manifest.ini +++ b/omemo/manifest.ini @@ -1,7 +1,7 @@ [info] name: OMEMO short_name: omemo -version: 2.6.63 +version: 2.6.64 description: OMEMO is an XMPP Extension Protocol (XEP) for secure multi-client end-to-end encryption based on Axolotl and PEP. You need to install some dependencies, you can find install instructions for your system in the Github Wiki. authors: Bahtiar `kalkin-` Gadimov Daniel Gultsch