Correctly handle Room.timeline events which have a nullable Room (#7635)

This commit is contained in:
Michael Telatynski 2022-01-26 13:24:14 +00:00 committed by GitHub
parent d239697384
commit 8e4ced6454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 62 additions and 55 deletions

View file

@ -71,10 +71,8 @@ export class RoomNotificationState extends NotificationState implements IDestroy
this.updateNotificationState();
};
private handleRoomEventUpdate = (event: MatrixEvent) => {
const roomId = event.getRoomId();
if (roomId !== this.room.roomId) return; // ignore - not for us
private handleRoomEventUpdate = (event: MatrixEvent, room: Room | null) => {
if (room?.roomId !== this.room.roomId) return; // ignore - not for us or notifications timeline
this.updateNotificationState();
};