Skip to content

Commit

Permalink
Re-check key backup after bootstrapSecretStorage (#3692)
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh authored Sep 5, 2023
1 parent c65e329 commit 0778c4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/unit/crypto/secrets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ describe("Secrets", function () {
this.emit(ClientEvent.AccountData, event);
return {};
};
bob.getKeyBackupVersion = jest.fn().mockResolvedValue(null);

await bob.bootstrapCrossSigning({
authUploadDeviceSigningKeys: async (func) => {
Expand Down
2 changes: 2 additions & 0 deletions src/crypto/EncryptionSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ export class EncryptionSetupOperation {
prefix: ClientPrefix.V3,
});
}
// tell the backup manager to re-check the keys now that they have been (maybe) updated
await crypto.backupManager.checkKeyBackup();
}
}
}
Expand Down

0 comments on commit 0778c4e

Please sign in to comment.