[omemo] Dont throw exception on missing session
This commit is contained in:
@@ -494,13 +494,9 @@ class LiteAxolotlStore(AxolotlStore):
|
|||||||
|
|
||||||
def isTrusted(self, recipient_id, device_id):
|
def isTrusted(self, recipient_id, device_id):
|
||||||
record = self.loadSession(recipient_id, device_id)
|
record = self.loadSession(recipient_id, device_id)
|
||||||
|
if record.isFresh():
|
||||||
try:
|
|
||||||
identity_key = record.getSessionState().getRemoteIdentityKey()
|
|
||||||
except Exception:
|
|
||||||
log.exception('Unable to determine trust for %s %s',
|
|
||||||
recipient_id, device_id)
|
|
||||||
return False
|
return False
|
||||||
|
identity_key = record.getSessionState().getRemoteIdentityKey()
|
||||||
return self.getTrustForIdentity(
|
return self.getTrustForIdentity(
|
||||||
recipient_id, identity_key) == Trust.TRUSTED
|
recipient_id, identity_key) == Trust.TRUSTED
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user