encryption: Return a tuple as well if no decryption session is found.
This commit is contained in:
parent
7e1fc69cbf
commit
4323931309
1 changed files with 5 additions and 2 deletions
|
@ -649,12 +649,15 @@ class Olm():
|
||||||
@encrypt_enabled
|
@encrypt_enabled
|
||||||
def group_decrypt(self, room_id, session_id, ciphertext):
|
def group_decrypt(self, room_id, session_id, ciphertext):
|
||||||
if session_id not in self.inbound_group_sessions[room_id]:
|
if session_id not in self.inbound_group_sessions[room_id]:
|
||||||
return None
|
return None, None
|
||||||
|
|
||||||
session = self.inbound_group_sessions[room_id][session_id]
|
session = self.inbound_group_sessions[room_id][session_id]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return session.decrypt(ciphertext)
|
return session.decrypt(ciphertext)
|
||||||
except OlmGroupSessionError:
|
except OlmGroupSessionError:
|
||||||
|
pass
|
||||||
|
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
def share_group_session(self, room_id, own_id, users):
|
def share_group_session(self, room_id, own_id, users):
|
||||||
|
|
Loading…
Reference in a new issue