From d79349029aa6084912548b1b5189437d25ad4e94 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 4 May 2022 16:39:36 +0100 Subject: [PATCH] Fix soft crash around threads when room isn't yet in store (#8496) --- src/components/views/rooms/EventTile.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 5620559ad0..e8f0199c5f 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -402,8 +402,7 @@ export class UnwrappedEventTile extends React.Component { } private setupNotificationListener = (thread: Thread): void => { - const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); - const notifications = RoomNotificationStateStore.instance.getThreadsRoomState(room); + const notifications = RoomNotificationStateStore.instance.getThreadsRoomState(thread.room); this.threadState = notifications.getThreadRoomState(thread);