Hide e2e features if not enabled

Don't show the device info in the MemberInfo and UserSettings unless the user
has ticked the 'labs' box.
This commit is contained in:
Richard van der Hoff 2016-06-14 11:57:08 +01:00
parent 3312a4d57e
commit e973d18085
2 changed files with 9 additions and 0 deletions

View file

@ -258,6 +258,10 @@ module.exports = React.createClass({
},
_renderDeviceInfo: function() {
if (!UserSettingsStore.isFeatureEnabled("e2e_encryption")) {
return null;
}
var client = MatrixClientPeg.get();
var deviceId = client.deviceId;
var olmKey = client.getDeviceEd25519Key() || "<not supported>";