mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
don't assume roomKeys is an array
This commit is contained in:
parent
4c1aaaf416
commit
4a2faed198
@ -60,10 +60,12 @@ export class DeviceMessageHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_applyDecryptChanges(rooms, {roomKeys}) {
|
_applyDecryptChanges(rooms, {roomKeys}) {
|
||||||
const roomKeysByRoom = groupBy(roomKeys, s => s.roomId);
|
if (roomKeys && roomKeys.length) {
|
||||||
for (const [roomId, roomKeys] of roomKeysByRoom) {
|
const roomKeysByRoom = groupBy(roomKeys, s => s.roomId);
|
||||||
const room = rooms.get(roomId);
|
for (const [roomId, roomKeys] of roomKeysByRoom) {
|
||||||
room?.notifyRoomKeys(roomKeys);
|
const room = rooms.get(roomId);
|
||||||
|
room?.notifyRoomKeys(roomKeys);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user