fix: React to all decryption errors with ratchet restoration

This commit is contained in:
PapaTutuWawa committed 2022-09-25 11:35:12 +02:00
1 parent 47948fa6ea
commit bea433e377
1 file changed
+1 -1
+1 -1
View File
@@ -381,7 +381,7 @@ class OmemoSessionManager {
} else { } else {
keyAndHmac = await ratchet.ratchetDecrypt(message, decodedRawKey); keyAndHmac = await ratchet.ratchetDecrypt(message, decodedRawKey);
} }
} on InvalidMessageHMACException { } catch (_) {
await _restoreRatchet(ratchetKey, oldRatchet); await _restoreRatchet(ratchetKey, oldRatchet);
rethrow; rethrow;
} }