fix: React to all decryption errors with ratchet restoration

This commit is contained in:
PapaTutuWawa 2022-09-25 11:35:12 +02:00
parent 47948fa6ea
commit bea433e377

View File

@ -381,7 +381,7 @@ class OmemoSessionManager {
} else {
keyAndHmac = await ratchet.ratchetDecrypt(message, decodedRawKey);
}
} on InvalidMessageHMACException {
} catch (_) {
await _restoreRatchet(ratchetKey, oldRatchet);
rethrow;
}