Skip to content

Commit 0778c4e

Browse files
authored
Re-check key backup after bootstrapSecretStorage (#3692)
Fixes element-hq/element-web#26115
1 parent c65e329 commit 0778c4e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

spec/unit/crypto/secrets.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ describe("Secrets", function () {
312312
this.emit(ClientEvent.AccountData, event);
313313
return {};
314314
};
315+
bob.getKeyBackupVersion = jest.fn().mockResolvedValue(null);
315316

316317
await bob.bootstrapCrossSigning({
317318
authUploadDeviceSigningKeys: async (func) => {

src/crypto/EncryptionSetup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ export class EncryptionSetupOperation {
228228
prefix: ClientPrefix.V3,
229229
});
230230
}
231+
// tell the backup manager to re-check the keys now that they have been (maybe) updated
232+
await crypto.backupManager.checkKeyBackup();
231233
}
232234
}
233235
}

0 commit comments

Comments
 (0)