You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-19 05:22:13 +03:00
Make blacklistUnverifiedDevices override the level order
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -1104,6 +1104,7 @@ module.exports = React.createClass({
|
||||
SettingLevel.ROOM_DEVICE,
|
||||
"blacklistUnverifiedDevices",
|
||||
room.roomId,
|
||||
/*explicit=*/true,
|
||||
);
|
||||
room.setBlacklistUnverifiedDevices(blacklistEnabled);
|
||||
}
|
||||
|
||||
@@ -147,9 +147,12 @@ export default React.createClass({
|
||||
return <Spinner />;
|
||||
}
|
||||
|
||||
// The global value is treated as a default for when rooms don't specify a value.
|
||||
const client = MatrixClientPeg.get();
|
||||
const blacklistUnverified = client.getGlobalBlacklistUnverifiedDevices() ||
|
||||
this.props.room.getBlacklistUnverifiedDevices();
|
||||
let blacklistUnverified = client.getGlobalBlacklistUnverifiedDevices();
|
||||
if (this.props.room.getBlacklistUnverifiedDevices() !== null) {
|
||||
blacklistUnverified = this.props.room.getBlacklistUnverifiedDevices();
|
||||
}
|
||||
|
||||
let warning;
|
||||
if (blacklistUnverified) {
|
||||
|
||||
@@ -369,6 +369,7 @@ module.exports = React.createClass({
|
||||
SettingLevel.ROOM_DEVICE,
|
||||
"blacklistUnverifiedDevices",
|
||||
this.props.room.roomId,
|
||||
/*explicit=*/true,
|
||||
);
|
||||
this.props.room.setBlacklistUnverifiedDevices(value);
|
||||
});
|
||||
@@ -592,21 +593,6 @@ module.exports = React.createClass({
|
||||
/>
|
||||
);
|
||||
|
||||
const deviceBlacklisting = SettingsStore.getValueAt(
|
||||
SettingLevel.DEVICE,
|
||||
"blacklistUnverifiedDevices",
|
||||
this.props.room.roomId,
|
||||
/*explicit=*/true
|
||||
);
|
||||
if (deviceBlacklisting === true) {
|
||||
settings = (
|
||||
<label>
|
||||
<input type="checkbox" disabled={true} checked={true} />
|
||||
{ SettingsStore.getDisplayName("blacklistUnverifiedDevices", SettingLevel.ROOM_DEVICE) }
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
if (!isEncrypted && roomState.mayClientSendStateEvent("m.room.encryption", cli)) {
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user