mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
fix not taking into account Object.entries yields arrays for the pairs
This commit is contained in:
parent
561df45641
commit
78c3157a5f
@ -186,8 +186,8 @@ export class DeviceTracker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_filterVerifiedDeviceKeys(keyQueryDeviceKeysResponse) {
|
_filterVerifiedDeviceKeys(keyQueryDeviceKeysResponse) {
|
||||||
const verifiedKeys = Object.entries(keyQueryDeviceKeysResponse).map((userId, keysByDevice) => {
|
const verifiedKeys = Object.entries(keyQueryDeviceKeysResponse).map(([userId, keysByDevice]) => {
|
||||||
const verifiedKeys = Object.entries(keysByDevice).filter((deviceId, deviceKeys) => {
|
const verifiedEntries = Object.entries(keysByDevice).filter(([deviceId, deviceKeys]) => {
|
||||||
const deviceIdOnKeys = deviceKeys["device_id"];
|
const deviceIdOnKeys = deviceKeys["device_id"];
|
||||||
const userIdOnKeys = deviceKeys["user_id"];
|
const userIdOnKeys = deviceKeys["user_id"];
|
||||||
if (userIdOnKeys !== userId) {
|
if (userIdOnKeys !== userId) {
|
||||||
@ -198,6 +198,7 @@ export class DeviceTracker {
|
|||||||
}
|
}
|
||||||
return this._verifyUserDeviceKeys(deviceKeys);
|
return this._verifyUserDeviceKeys(deviceKeys);
|
||||||
});
|
});
|
||||||
|
const verifiedKeys = verifiedEntries.map(([, deviceKeys]) => deviceKeys);
|
||||||
return {userId, verifiedKeys};
|
return {userId, verifiedKeys};
|
||||||
});
|
});
|
||||||
return verifiedKeys;
|
return verifiedKeys;
|
||||||
|
Loading…
Reference in New Issue
Block a user