From 7e1fc69cbfae3432f2814f251ad7306796ca24e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 13 Jul 2018 15:39:18 +0200 Subject: [PATCH] encryption: Return a tuple even if group decryption failed. --- matrix/encryption.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/matrix/encryption.py b/matrix/encryption.py index d8a332e..6c09e12 100644 --- a/matrix/encryption.py +++ b/matrix/encryption.py @@ -653,11 +653,9 @@ class Olm(): session = self.inbound_group_sessions[room_id][session_id] try: - plaintext = session.decrypt(ciphertext) + return session.decrypt(ciphertext) except OlmGroupSessionError: - return None - - return plaintext + return None, None def share_group_session(self, room_id, own_id, users): group_session = self.outbound_group_sessions[room_id]