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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);