1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-01 04:43:29 +03:00

Merge pull request #1364 from matrix-org/dbkr/emit_on_store_trusted_master_key

Emit event when a trusted self-key is stored
This commit is contained in:
David Baker
2020-05-01 15:27:36 +01:00
committed by GitHub

View File

@@ -2027,6 +2027,10 @@ Crypto.prototype.setDeviceVerification = async function(
if (!this._crossSigningInfo.getId() && userId === this._crossSigningInfo.userId) {
this._storeTrustedSelfKeys(xsk.keys);
// This will cause our own user trust to change, so emit the event
this.emit(
"userTrustStatusChanged", this._userId, this.checkUserTrust(userId),
);
}
// Now sign the master key with our user signing key (unless it's ourself)