Commit 5e4ea58e authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[omemo] Don't include inactive devices on checking undecided trust

parent c16625f8
......@@ -656,7 +656,11 @@ class LiteAxolotlStore(AxolotlStore):
query = '''SELECT public_key as "public_key [pk]" FROM identities
WHERE recipient_id = ? AND trust = ?'''
result = self._con.execute(query, (jid, Trust.UNDECIDED)).fetchall()
return True if result else False
undecided = [row.public_key for row in result]
inactive = self.getInactiveSessionsKeys(jid)
undecided = set(undecided) - set(inactive)
return bool(undecided)
def getTrustedFingerprints(self, jid):
query = '''SELECT public_key as "public_key [pk]" FROM identities
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