Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 6777e07

Browse files
committed
Remove device name from crypto section
As it was getting it by assuming our device was the first one, which is just not a valid assumption.
1 parent 8ffe148 commit 6777e07

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/components/structures/UserSettings.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -339,25 +339,14 @@ module.exports = React.createClass({
339339

340340
_renderCryptoInfo: function() {
341341
const client = MatrixClientPeg.get();
342-
if (!client.isCryptoEnabled()) {
343-
return <div>
344-
<h3>Cryptography</h3>
345-
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection error">
346-
End-to-end encryption is disabled
347-
</div>
348-
</div>;
349-
}
350-
351-
var deviceId = client.deviceId;
352-
var identityKey = client.getDeviceEd25519Key() || "<not supported>";
342+
const deviceId = client.deviceId;
343+
const identityKey = client.getDeviceEd25519Key() || "<not supported>";
353344

354-
var myDevice = client.getStoredDevicesForUser(MatrixClientPeg.get().credentials.userId)[0];
355345
return (
356346
<div>
357347
<h3>Cryptography</h3>
358348
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection">
359349
<ul>
360-
<li><label>Device name:</label> <span>{ myDevice.getDisplayName() }</span></li>
361350
<li><label>Device ID:</label> <span><code>{deviceId}</code></span></li>
362351
<li><label>Device key:</label> <span><code><b>{identityKey}</b></code></span></li>
363352
</ul>

0 commit comments

Comments
 (0)