Skip to content

fix: prevent phantom badges in bridged rooms#2588

Open
andrewmurphyio wants to merge 1 commit intocinnyapp:devfrom
andrewmurphyio:fix/bridged-room-phantom-badges
Open

fix: prevent phantom badges in bridged rooms#2588
andrewmurphyio wants to merge 1 commit intocinnyapp:devfrom
andrewmurphyio:fix/bridged-room-phantom-badges

Conversation

@andrewmurphyio
Copy link
Contributor

@andrewmurphyio andrewmurphyio commented Feb 4, 2026

Fixes #2589

Fixes phantom unread badges appearing in bridged rooms (e.g., Slack, Discord bridges) where read receipts do not sync back to Matrix.

Problem

When using bridged rooms, reading messages on the other side (e.g., in Slack) does not update the Matrix read receipt. This causes roomHaveUnread() to return true even when the server notification count is 0, resulting in phantom badges.

Solution

Make the server notification count authoritative. Only add a room to the unread list if the server actually reports notifications (total > 0 or highlight > 0). This prevents phantom badges while still respecting the server's notification state.

Testing

  1. Set up a bridged room (e.g., Slack bridge)
  2. Read messages on the bridge side (not in Cinny)
  3. Refresh Cinny
  4. Previously: phantom badge would appear
  5. Now: no badge if server reports 0 notifications

When using bridged rooms (e.g., Slack bridge), read receipts may not
sync back to Matrix. This causes roomHaveUnread() to return true
even when the server notification count is 0.

Now we only add a room to the unread list if the server actually
reports notifications (total > 0 or highlight > 0). This makes the
server notification count authoritative and prevents phantom badges.
@vrisalab
Copy link

I've been testing this for a week, and it fixes the issue on a single client. Sadly, when using multiple devices (Desktop and a phone for example), ghost notifications for things read on one device appear on the other device. I'm not sure if this is easily fixable, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phantom unread badges in bridged rooms

2 participants