From 2b734b8e69a3acfa7b3e757ca379c554461dfcb1 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 13 Dec 2018 15:53:29 +0000 Subject: [PATCH] Emit for key backup failures Signed-off-by: J. Ryan Stinnett --- src/client.js | 1 + src/crypto/index.js | 1 + 2 files changed, 2 insertions(+) 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; } }