diff --git a/src/client.js b/src/client.js index 60d66cede..9198b2001 100644 --- a/src/client.js +++ b/src/client.js @@ -677,7 +677,7 @@ MatrixClient.prototype.initCrypto = async function() { "crypto.devicesUpdated", "deviceVerificationChanged", "userVerificationChanged", - "cross-signing.keysChanged", + "crossSigning.keysChanged", ]); logger.log("Crypto: initialising crypto object..."); @@ -5125,7 +5125,7 @@ module.exports.CRYPTO_ENABLED = CRYPTO_ENABLED; * in user. The checkOwnCrossSigningTrust function may be used to reconcile * the trust in the account key. * - * @event module:client~MatrixClient#"cross-signing.keysChanged" + * @event module:client~MatrixClient#"crossSigning.keysChanged" */ /** @@ -5189,7 +5189,7 @@ module.exports.CRYPTO_ENABLED = CRYPTO_ENABLED; * Fires when a secret request has been cancelled. If the client is prompting * the user to ask whether they want to share a secret, the prompt can be * dismissed. - * @event module:client~MatrixClient#"crypto.secrets.request_cancelled" + * @event module:client~MatrixClient#"crypto.secrets.requestCancelled" * @param {object} data * @param {string} data.user_id The user ID of the client that had requested the secret. * @param {string} data.device_id The device ID of the client that had requested the diff --git a/src/crypto/Secrets.js b/src/crypto/Secrets.js index e6fafa1d5..779b11a3d 100644 --- a/src/crypto/Secrets.js +++ b/src/crypto/Secrets.js @@ -383,7 +383,7 @@ export default class SecretStorage extends EventEmitter { && this._incomingRequests[deviceId][content.request_id]) { logger.info("received request cancellation for secret (" + sender + ", " + deviceId + ", " + content.request_id + ")"); - this.baseApis.emit("crypto.secrets.request_cancelled", { + this.baseApis.emit("crypto.secrets.requestCancelled", { user_id: sender, device_id: deviceId, request_id: content.request_id, diff --git a/src/crypto/index.js b/src/crypto/index.js index 03848553f..a94868324 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -352,7 +352,7 @@ Crypto.prototype.resetCrossSigningKeys = async function(authDict, level) { keys[name + "_key"] = key; } await this._baseApis.uploadDeviceSigningKeys(authDict || {}, keys); - this._baseApis.emit("cross-signing.keysChanged", {}); + this._baseApis.emit("crossSigning.keysChanged", {}); // sign the current device with the new key, and upload to the server const device = this._deviceList.getStoredDevice(this._userId, this._deviceId); @@ -551,7 +551,7 @@ Crypto.prototype._onDeviceListUserCrossSigningUpdated = async function(userId) { // If it's not changed, just make sure everything is up to date await this.checkOwnCrossSigningTrust(); } else { - this.emit("cross-signing.keysChanged", {}); + this.emit("crossSigning.keysChanged", {}); // We'll now be in a state where cross-signing on the account is not trusted // because our locally stored cross-signing keys will not match the ones // on the server for our account. The app must call checkOwnCrossSigningTrust()