You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
ElementR: Check key backup when user identity changes (#3760)
Fixes vector-im/element-web#26244
This commit is contained in:
@@ -1339,6 +1339,12 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
|
||||
public async onUserIdentityUpdated(userId: RustSdkCryptoJs.UserId): Promise<void> {
|
||||
const newVerification = await this.getUserVerificationStatus(userId.toString());
|
||||
this.emit(CryptoEvent.UserTrustStatusChanged, userId.toString(), newVerification);
|
||||
|
||||
// If our own user identity has changed, we may now trust the key backup where we did not before.
|
||||
// So, re-check the key backup status and enable it if available.
|
||||
if (userId.toString() === this.userId) {
|
||||
await this.checkKeyBackupAndEnable();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user