also ask for new key if backup version is not found

This commit is contained in:
Bruno Windels 2022-01-31 17:30:51 +01:00
parent 17275a5390
commit 62acd458c6

View file

@ -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 {