1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-17 17:42:41 +03:00

Make blacklistUnverifiedDevices override the level order

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston
2017-11-08 17:41:32 -07:00
parent c7d8f3931f
commit f7da5836e1
5 changed files with 26 additions and 24 deletions

View File

@@ -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) {