From 282577cefb9560dc9104747d75066beeb9aba60c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 9 Apr 2020 13:43:51 +0200 Subject: [PATCH] recalculate toasts when cross-signing gets en/disabled --- src/DeviceListener.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DeviceListener.js b/src/DeviceListener.js index 80ea693a38..21c844e11c 100644 --- a/src/DeviceListener.js +++ b/src/DeviceListener.js @@ -50,6 +50,7 @@ export default class DeviceListener { MatrixClientPeg.get().on('crypto.devicesUpdated', this._onDevicesUpdated); MatrixClientPeg.get().on('deviceVerificationChanged', this._onDeviceVerificationChanged); MatrixClientPeg.get().on('userTrustStatusChanged', this._onUserTrustStatusChanged); + MatrixClientPeg.get().on('crossSigning.keysChanged', this._onCrossSingingKeysChanged); MatrixClientPeg.get().on('accountData', this._onAccountData); this._recheck(); } @@ -59,6 +60,7 @@ export default class DeviceListener { MatrixClientPeg.get().removeListener('crypto.devicesUpdated', this._onDevicesUpdated); MatrixClientPeg.get().removeListener('deviceVerificationChanged', this._onDeviceVerificationChanged); MatrixClientPeg.get().removeListener('userTrustStatusChanged', this._onUserTrustStatusChanged); + MatrixClientPeg.get().removeListener('crossSigning.keysChanged', this._onCrossSingingKeysChanged); MatrixClientPeg.get().removeListener('accountData', this._onAccountData); } this._dismissed.clear(); @@ -89,6 +91,10 @@ export default class DeviceListener { this._recheck(); } + _onCrossSingingKeysChanged = () => { + this._recheck(); + } + _onAccountData = (ev) => { // User may have: // * migrated SSSS to symmetric