diff --git a/src/client.js b/src/client.js index c942acb9d..339333319 100644 --- a/src/client.js +++ b/src/client.js @@ -447,6 +447,7 @@ MatrixClient.prototype.initCrypto = async function() { ); this.reEmitter.reEmit(crypto, [ + "crypto.keyBackupFailed", "crypto.roomKeyRequest", "crypto.roomKeyRequestCancellation", "crypto.warning", diff --git a/src/crypto/index.js b/src/crypto/index.js index 4cd218ee2..9e8daf93e 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -1023,6 +1023,7 @@ Crypto.prototype._scheduleKeyBackupSend = async function() { ) { // Backup version has changed or this backup version // has been deleted + this.emit("crypto.keyBackupFailed", err.data.errcode); throw err; } }