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,12 +60,14 @@ export class DeviceMessageHandler {
|
||||
}
|
||||
|
||||
_applyDecryptChanges(rooms, {roomKeys}) {
|
||||
if (roomKeys && roomKeys.length) {
|
||||
const roomKeysByRoom = groupBy(roomKeys, s => s.roomId);
|
||||
for (const [roomId, roomKeys] of roomKeysByRoom) {
|
||||
const room = rooms.get(roomId);
|
||||
room?.notifyRoomKeys(roomKeys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// not safe to call multiple times without awaiting first call
|
||||
async decryptPending(rooms) {
|
||||
|
Loading…
Reference in New Issue
Block a user