1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-20 16:22:28 +03:00

Merge pull request #2817 from matrix-org/travis/blacklist-unverified-devices

Attach an onChange listener to the room's blacklist devices option
This commit is contained in:
Travis Ralston
2019-03-25 09:59:29 -06:00
committed by GitHub

View File

@@ -197,6 +197,10 @@ export default class SecurityRoomSettingsTab extends React.Component {
}); });
}; };
_updateBlacklistDevicesFlag = (checked) => {
MatrixClientPeg.get().getRoom(this.props.roomId).setBlacklistUnverifiedDevices(checked);
};
_renderRoomAccess() { _renderRoomAccess() {
const client = MatrixClientPeg.get(); const client = MatrixClientPeg.get();
const room = client.getRoom(this.props.roomId); const room = client.getRoom(this.props.roomId);
@@ -318,6 +322,7 @@ export default class SecurityRoomSettingsTab extends React.Component {
let encryptionSettings = null; let encryptionSettings = null;
if (isEncrypted) { if (isEncrypted) {
encryptionSettings = <SettingsFlag name="blacklistUnverifiedDevices" level={SettingLevel.ROOM_DEVICE} encryptionSettings = <SettingsFlag name="blacklistUnverifiedDevices" level={SettingLevel.ROOM_DEVICE}
onChange={this._updateBlacklistDevicesFlag}
roomId={this.props.roomId} />; roomId={this.props.roomId} />;
} }