You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
More modern loop syntax
This commit is contained in:
@@ -133,15 +133,9 @@ export default class DeviceList {
|
|||||||
this._syncToken = deviceData ? deviceData.syncToken : null;
|
this._syncToken = deviceData ? deviceData.syncToken : null;
|
||||||
}
|
}
|
||||||
this._userByIdentityKey = {};
|
this._userByIdentityKey = {};
|
||||||
for (const user in this._devices) {
|
for (const user of Object.keys(this._devices)) {
|
||||||
if (!this._devices.hasOwnProperty(user)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const userDevices = this._devices[user];
|
const userDevices = this._devices[user];
|
||||||
for (const device in userDevices) {
|
for (const device of Object.keys(userDevices)) {
|
||||||
if (!userDevices.hasOwnProperty(device)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const idKey = userDevices[device].keys['curve25519:'+device];
|
const idKey = userDevices[device].keys['curve25519:'+device];
|
||||||
if (idKey !== undefined) {
|
if (idKey !== undefined) {
|
||||||
this._userByIdentityKey[idKey] = user;
|
this._userByIdentityKey[idKey] = user;
|
||||||
|
|||||||
Reference in New Issue
Block a user