#9716·synapse

Changing nickname resets highlight_count

Author: germain-ggCreated Mar 30, 2021Updated Dec 12, 2023
LabelsS-MinorT-DefectO-OccasionalZ-GetYourUpdates

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

javascript
// 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

Steps to reproduce

https://user-images.githubusercontent.com/769871/113018171-27840a80-9178-11eb-8b2a-344f31b9528e.mov

Version information

  • Homeserver: matrix.org