From 76fe87c941fd20185932907ffc598b54ae559b48 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 13 Jan 2020 17:41:58 +0000 Subject: [PATCH 1/4] Don't error on unverifie/unknownd devices. When cross-signing is enabled, we no longer want to fail and prompt the user to ack every device in the room. All the info should be conveyed in the shield colour (although isn't fully just yet). Fixes https://github.com/vector-im/riot-web/issues/11750 Requires https://github.com/matrix-org/matrix-js-sdk/pull/1150 --- src/components/structures/MatrixChat.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index af3f4d2598..ce6f7d936f 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1506,6 +1506,15 @@ export default createReactClass({ ); cli.setGlobalBlacklistUnverifiedDevices(blacklistEnabled); } + + // With cross-signing enabled, we send to unknown devices + // without prompting. Any bad-device status the user should + // be aware of will be signalled through the room shield + // changing colour. More advanced behaviour will come once + // we implement more settings. + cli.setGlobalErrorOnUnknownDevices( + !SettingsStore.isFeatureEnabled("feature_cross_signing") + ); }, showScreen: function(screen, params) { From e47240d838b94b14230e8dc98f8ade7cf0b41e6b Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 13 Jan 2020 17:56:40 +0000 Subject: [PATCH 2/4] Lint Eastwood --- src/components/structures/MatrixChat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index ce6f7d936f..a07446d971 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1513,7 +1513,7 @@ export default createReactClass({ // changing colour. More advanced behaviour will come once // we implement more settings. cli.setGlobalErrorOnUnknownDevices( - !SettingsStore.isFeatureEnabled("feature_cross_signing") + !SettingsStore.isFeatureEnabled("feature_cross_signing"), ); }, From 9a1be1a24d53bac3ea0771f8550ec0b337004f42 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 13 Jan 2020 21:54:14 +0000 Subject: [PATCH 3/4] Don't try to set crypto options without crypto enabled --- src/components/structures/MatrixChat.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index a07446d971..323bec4441 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1505,16 +1505,17 @@ export default createReactClass({ "blacklistUnverifiedDevices", ); cli.setGlobalBlacklistUnverifiedDevices(blacklistEnabled); + + // With cross-signing enabled, we send to unknown devices + // without prompting. Any bad-device status the user should + // be aware of will be signalled through the room shield + // changing colour. More advanced behaviour will come once + // we implement more settings. + cli.setGlobalErrorOnUnknownDevices( + !SettingsStore.isFeatureEnabled("feature_cross_signing"), + ); } - // With cross-signing enabled, we send to unknown devices - // without prompting. Any bad-device status the user should - // be aware of will be signalled through the room shield - // changing colour. More advanced behaviour will come once - // we implement more settings. - cli.setGlobalErrorOnUnknownDevices( - !SettingsStore.isFeatureEnabled("feature_cross_signing"), - ); }, showScreen: function(screen, params) { From 14501b748b9633e7a3990d846c25ff53c6f38e12 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 13 Jan 2020 21:58:26 +0000 Subject: [PATCH 4/4] lint again --- src/components/structures/MatrixChat.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 323bec4441..2515035996 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1515,7 +1515,6 @@ export default createReactClass({ !SettingsStore.isFeatureEnabled("feature_cross_signing"), ); } - }, showScreen: function(screen, params) {