mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08: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:
commit
0d5c98634d
@ -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 = <SettingsFlag name="blacklistUnverifiedDevices" level={SettingLevel.ROOM_DEVICE}
|
||||
onChange={this._updateBlacklistDevicesFlag}
|
||||
roomId={this.props.roomId} />;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user