From 2b46c560c7fb6e63d6df1001979fd413e405d2e5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 31 Oct 2018 18:07:12 +0000 Subject: [PATCH] Add crypto. prefix to keyBackupStatus event --- src/client.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client.js b/src/client.js index 9bb259038..84c42ae18 100644 --- a/src/client.js +++ b/src/client.js @@ -838,7 +838,7 @@ MatrixClient.prototype.enableKeyBackup = function(info) { this._crypto.backupKey = new global.Olm.PkEncryption(); this._crypto.backupKey.set_recipient_key(info.auth_data.public_key); - this.emit('keyBackupStatus', true); + this.emit('crypto.keyBackupStatus', true); }; /** @@ -853,7 +853,7 @@ MatrixClient.prototype.disableKeyBackup = function() { if (this._crypto.backupKey) this._crypto.backupKey.free(); this._crypto.backupKey = null; - this.emit('keyBackupStatus', false); + this.emit('crypto.keyBackupStatus', false); }; /** @@ -4065,10 +4065,10 @@ module.exports.CRYPTO_ENABLED = CRYPTO_ENABLED; /** * Fires whenever the status of e2e key backup changes, as returned by getKeyBackupEnabled() - * @event module:client~MatrixClient#"keyBackupStatus" + * @event module:client~MatrixClient#"crypto.keyBackupStatus" * @param {bool} enabled true if key backup has been enabled, otherwise false * @example - * matrixClient.on("keyBackupStatus", function(enabled){ + * matrixClient.on("crypto.keyBackupStatus", function(enabled){ * if (enabled) { * [...] * }