Don't throw an exception entering settings page
if end to end encryption is disabled (eg. if you're a guest and the server is too old to support e2e for guests).
This commit is contained in:
parent
61cf08ca1b
commit
8ffe14881e
1 changed files with 10 additions and 1 deletions
|
@ -338,7 +338,16 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
_renderCryptoInfo: function() {
|
||||
var client = MatrixClientPeg.get();
|
||||
const client = MatrixClientPeg.get();
|
||||
if (!client.isCryptoEnabled()) {
|
||||
return <div>
|
||||
<h3>Cryptography</h3>
|
||||
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection error">
|
||||
End-to-end encryption is disabled
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
|
||||
var deviceId = client.deviceId;
|
||||
var identityKey = client.getDeviceEd25519Key() || "<not supported>";
|
||||
|
||||
|
|
Loading…
Reference in a new issue