1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Try to load keys from key backup when a message fails to decrypt (#2373)

Co-authored-by: Travis Ralston <travisr@matrix.org>
This commit is contained in:
Faye Duxovni
2022-06-01 00:43:23 -04:00
committed by GitHub
parent 142c285063
commit 8412ccfa9b
10 changed files with 484 additions and 252 deletions

View File

@@ -1298,7 +1298,9 @@ class MegolmDecryption extends DecryptionAlgorithm {
if (res === null) {
// We've got a message for a session we don't have.
//
// try and get the missing key from the backup first
this.crypto.backupManager.queryKeyBackupRateLimited(event.getRoomId(), content.session_id).catch(() => {});
// (XXX: We might actually have received this key since we started
// decrypting, in which case we'll have scheduled a retry, and this
// request will be redundant. We could probably check to see if the