From 971c57552bc4b234053be4846ba83e962668745f Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 7 Apr 2020 10:57:10 +0100 Subject: [PATCH] Check more account data in toast listener Since any change to cross-signing or secret storage account data may affect the outcome of checks in the toast listener, we need to broaden the account data listener there to re-run for changes to all such bits of account data. Fixes https://github.com/vector-im/riot-web/issues/13048 --- src/DeviceListener.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/DeviceListener.js b/src/DeviceListener.js index ddeacedd75..80ea693a38 100644 --- a/src/DeviceListener.js +++ b/src/DeviceListener.js @@ -90,8 +90,15 @@ export default class DeviceListener { } _onAccountData = (ev) => { - // User may have migrated SSSS to symmetric, in which case we can dismiss that toast - if (ev.getType().startsWith('m.secret_storage.key.')) { + // User may have: + // * migrated SSSS to symmetric + // * uploaded keys to secret storage + // * completed secret storage creation + // which result in account data changes affecting checks below. + if ( + ev.getType().startsWith('m.secret_storage.') || + ev.getType().startsWith('m.cross_signing.') + ) { this._recheck(); } }