element-hq / element-hq/synapse
Changing nickname resets highlight_count
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#9716](https://github.com/matrix-org/synapse/issues/9716).
---
### Description
Changing your nickname resets `highlight_count` and tranfer its value to `notification_count`
View original ticket on vector-im/element-web#15860
I originally investigated this issue across `matrix-react-sdk` and `matrix-js-sdk` and this led me to the `sync` endpoint.
I see that `data.rooms.join.{ROOM-ID}.unread_notifications` returns an unexpected value.
The property `highlight_count` should be `x` but instead gets reset to `0` and the `notification_count` was `0` but is set to `x`
```js
// state of "data.rooms.join.{ROOM-ID}.unread_notifications" before changing nickname
{
"highlight_count": 3,
"notification_count": 1
}
// change nickname
// state of "data.rooms.join.{ROOM-ID}.unread_notifications"
{
"highlight_count": 0,
"notification_count": 4
}
```
I captured what was yielded in the network tab of the Chrome DevTools [notification_count.har.zip](https://github.com/matrix-org/synapse/files/6230295/notification_count.har.zip)
### Steps to reproduce
https://user-images.githubusercontent.com/769871/113018171-27840a80-9178-11eb-8b2a-344f31b9528e.mov
### Version information
- **Homeserver**: matrix.org
Contributor guide
Assessment
This issue has not been assessed yet.