From 50614fa7fb95364247de39ddfc7e6f5bfc14c35f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 22 Mar 2019 14:22:20 -0600 Subject: [PATCH] Attach an onChange listener to the room's blacklist devices option Fixes https://github.com/vector-im/riot-web/issues/9235 The global option in user settings is unaffected by this bug. Users who have previously set the per-room flag without success can simply refresh the page and the change will be picked up. The bug here is that the current session would not update accordingly, however. Introduced in https://github.com/matrix-org/matrix-react-sdk/pull/2523 --- .../views/settings/tabs/room/SecurityRoomSettingsTab.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js index f4293a60dc2..b44d7b019d7 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js @@ -197,6 +197,10 @@ export default class SecurityRoomSettingsTab extends React.Component { }); }; + _updateBlacklistDevicesFlag = (checked) => { + MatrixClientPeg.get().getRoom(this.props.roomId).setBlacklistUnverifiedDevices(checked); + }; + _renderRoomAccess() { const client = MatrixClientPeg.get(); const room = client.getRoom(this.props.roomId); @@ -318,6 +322,7 @@ export default class SecurityRoomSettingsTab extends React.Component { let encryptionSettings = null; if (isEncrypted) { encryptionSettings = ; }