From 0583ea6a253074f300f7e17c213762f974b8a47b Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 10 Mar 2021 12:11:48 +0000 Subject: [PATCH] Ignore to-device decryption in the room list store This avoids meaningless warnings about "unknown" rooms. --- src/stores/room-list/RoomListStore.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts index 5775e685fd..3f415f946d 100644 --- a/src/stores/room-list/RoomListStore.ts +++ b/src/stores/room-list/RoomListStore.ts @@ -302,6 +302,9 @@ export class RoomListStoreClass extends AsyncStoreWithClient { } else if (payload.action === 'MatrixActions.Event.decrypted') { const eventPayload = (payload); // TODO: Type out the dispatcher types const roomId = eventPayload.event.getRoomId(); + if (!roomId) { + return; + } const room = this.matrixClient.getRoom(roomId); if (!room) { console.warn(`Event ${eventPayload.event.getId()} was decrypted in an unknown room ${roomId}`);