From 62acd458c6fbf66499ab25ca594975adf3cb1a2c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 31 Jan 2022 17:30:51 +0100 Subject: [PATCH] also ask for new key if backup version is not found --- src/matrix/e2ee/megolm/keybackup/KeyBackup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/e2ee/megolm/keybackup/KeyBackup.ts b/src/matrix/e2ee/megolm/keybackup/KeyBackup.ts index 998fb67f..e97eb0cf 100644 --- a/src/matrix/e2ee/megolm/keybackup/KeyBackup.ts +++ b/src/matrix/e2ee/megolm/keybackup/KeyBackup.ts @@ -93,7 +93,7 @@ export class KeyBackup { this._hasBackedUpAllKeys = true; } catch (err) { this._stopped = true; - if (err.name === "HomeServerError" && err.errcode === "M_WRONG_ROOM_KEYS_VERSION") { + if (err.name === "HomeServerError" && (err.errcode === "M_WRONG_ROOM_KEYS_VERSION" || err.errcode === "M_NOT_FOUND")) { log.set("wrong_version", true); this._needsNewKey = true; } else {