Fix soft crash around threads when room isn't yet in store (#8496)

This commit is contained in:
Michael Telatynski
2022-05-04 16:39:36 +01:00
committed by GitHub
parent a5b795c934
commit d79349029a

View File

@@ -402,8 +402,7 @@ export class UnwrappedEventTile extends React.Component<IProps, IState> {
}
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);