1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Camelcase event names

Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
David Baker
2019-11-14 11:04:37 +00:00
committed by GitHub
parent 693c749da0
commit d5d8032b5b
3 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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()