Skip to content

Commit

Permalink
Re-check key backup after bootstrapSecretStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Sep 4, 2023
1 parent 5ddd453 commit c8dcf47
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 c8dcf47

Please sign in to comment.