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]