Only show confetti if the current room is receiving an appropriate event

This commit is contained in:
Travis Ralston 2020-12-09 11:56:57 -07:00
parent d05ad1e36c
commit 3e3a32cf10

View file

@ -801,6 +801,7 @@ export default class RoomView extends React.Component<IProps, IState> {
private handleEffects = (ev) => { private handleEffects = (ev) => {
if (!this.state.room || !this.state.matrixClientIsReady) return; // not ready at all if (!this.state.room || !this.state.matrixClientIsReady) return; // not ready at all
if (ev.getRoomId() !== this.state.room.roomId) return; // not for us
const notifState = RoomNotificationStateStore.instance.getRoomState(this.state.room); const notifState = RoomNotificationStateStore.instance.getRoomState(this.state.room);
if (!notifState.isUnread) return; if (!notifState.isUnread) return;