[omemo] Save trust of message to database

This commit is contained in:
Philipp Hörist
2019-03-20 12:45:10 +01:00
parent 19e3ab9ba8
commit 7783864f99
6 changed files with 36 additions and 49 deletions

View File

@@ -532,7 +532,7 @@ class LiteAxolotlStore(AxolotlStore):
def getTrustedFingerprints(self, jid):
query = '''SELECT public_key as "public_key [pk]" FROM identities
WHERE recipient_id = ? AND trust = ?'''
result = self._con.execute(query, (jid, Trust.TRUSTED)).fetchall()
result = self._con.execute(query, (jid, Trust.VERIFIED)).fetchall()
return [row.public_key for row in result]
def getNewFingerprints(self, jid):
@@ -560,7 +560,7 @@ class LiteAxolotlStore(AxolotlStore):
return False
identity_key = record.getSessionState().getRemoteIdentityKey()
return self.getTrustForIdentity(
recipient_id, identity_key) == Trust.TRUSTED
recipient_id, identity_key) == Trust.VERIFIED
def isUntrustedIdentity(self, recipient_id, identity_key):
return self.getTrustForIdentity(