Correctly handle Room.timeline events which have a nullable Room
(#7635)
This commit is contained in:
parent
d239697384
commit
8e4ced6454
10 changed files with 62 additions and 55 deletions
|
@ -91,8 +91,8 @@ export default class WhoIsTypingTile extends React.Component<IProps, IState> {
|
|||
return WhoIsTypingTile.isVisible(this.state);
|
||||
};
|
||||
|
||||
private onRoomTimeline = (event: MatrixEvent, room: Room): void => {
|
||||
if (room?.roomId === this.props.room?.roomId) {
|
||||
private onRoomTimeline = (event: MatrixEvent, room: Room | null): void => {
|
||||
if (room?.roomId === this.props.room.roomId) {
|
||||
const userId = event.getSender();
|
||||
// remove user from usersTyping
|
||||
const usersTyping = this.state.usersTyping.filter((m) => m.userId !== userId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue