element-hq / element-hq/element-web

Room notification count can stop updating

Open
#26,938 1 comment 0 reactions 0 assignees View on GitHub
A-Notifications O-Uncommon S-Major T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

Repro steps unknown. This is to document my finding investigating a bug that happened to me over the weekend where the notification count on my room tiles simply stopped updating: I would get a notification in a room, but the badge on the room list wouldn't change to reflect the new value.

Somehow, the RoomTile's listener on the RoomNotificationState object had disappeared. There were other listeners on it (the space panel and the room list) but not the room tile.

The RoomNotificationState object that the RoomTile had also appeared to be a different one to the one stored by the store, ie. (having stored the RoomNotificationStateStore as `window.rnss`:

```
rnss.getRoomState(this.props.room) === this.notificationState
> false
```

Folding and re-expanding the list of rooms (ie. causing the RoomTile to remount) fixed the issue.

It's not clear how the listener got lost.

### Outcome

#### What did you expect?

#### What happened instead?

### Operating system

_No response_

### Application version

_No response_

### How did you install the app?

_No response_

### Homeserver

_No response_

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.