mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 22:58:18 +08:00
make it work
This commit is contained in:
parent
39c122fe4f
commit
d9c0513ee2
@ -24,6 +24,8 @@ var ObjectUtils = require("../../../ObjectUtils");
|
|||||||
var dis = require("../../../dispatcher");
|
var dis = require("../../../dispatcher");
|
||||||
var ScalarAuthClient = require("../../../ScalarAuthClient");
|
var ScalarAuthClient = require("../../../ScalarAuthClient");
|
||||||
var ScalarMessaging = require('../../../ScalarMessaging');
|
var ScalarMessaging = require('../../../ScalarMessaging');
|
||||||
|
var UserSettingsStore = require('../../../UserSettingsStore');
|
||||||
|
|
||||||
|
|
||||||
// parse a string as an integer; if the input is undefined, or cannot be parsed
|
// parse a string as an integer; if the input is undefined, or cannot be parsed
|
||||||
// as an integer, return a default.
|
// as an integer, return a default.
|
||||||
@ -283,9 +285,9 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_setRoomBlacklistUnverified: function(value) {
|
_setRoomBlacklistUnverified: function(value) {
|
||||||
var blacklistUnverifiedDevicesPerRoom = UserSettingsStore.getLocalSettings().blacklistUnverifiedDevicesPerRoom;
|
var blacklistUnverifiedDevicesPerRoom = UserSettingsStore.getLocalSettings().blacklistUnverifiedDevicesPerRoom || {};
|
||||||
blacklistUnverifiedDevicesPerRoom[this.props.room.roomId] = value;
|
blacklistUnverifiedDevicesPerRoom[this.props.room.roomId] = value;
|
||||||
UserSettingsStore.setLocalSettings('blacklistUnverifiedDevicesPerRoom', blacklistUnverifiedDevicesPerRoom);
|
UserSettingsStore.setLocalSetting('blacklistUnverifiedDevicesPerRoom', blacklistUnverifiedDevicesPerRoom);
|
||||||
|
|
||||||
this.props.room.setBlacklistUnverifiedDevices(value);
|
this.props.room.setBlacklistUnverifiedDevices(value);
|
||||||
},
|
},
|
||||||
@ -508,8 +510,8 @@ module.exports = React.createClass({
|
|||||||
var settings =
|
var settings =
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" ref="blacklistUnverified"
|
<input type="checkbox" ref="blacklistUnverified"
|
||||||
checked={ isGlobalBlacklistUnverified || isRoomBlacklistUnverified }
|
defaultChecked={ isGlobalBlacklistUnverified || isRoomBlacklistUnverified }
|
||||||
disabled={ isGlobalBlacklistUnverified || !this.refs.encrypt.checked }/>
|
disabled={ isGlobalBlacklistUnverified || (this.refs.encrypt && !this.refs.encrypt.checked) }/>
|
||||||
Never send encrypted messages to unverified devices in this room.
|
Never send encrypted messages to unverified devices in this room.
|
||||||
</label>;
|
</label>;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user