Skip to content

Fix MentionsAndKeywords rooms showing badges for all messages#2584

Closed
andrewmurphyio wants to merge 2 commits intocinnyapp:devfrom
andrewmurphyio:fix/mentions-keywords-badge
Closed

Fix MentionsAndKeywords rooms showing badges for all messages#2584
andrewmurphyio wants to merge 2 commits intocinnyapp:devfrom
andrewmurphyio:fix/mentions-keywords-badge

Conversation

@andrewmurphyio
Copy link
Contributor

Description

Fixes #2583

Rooms set to "Mentions and Keywords" notification mode now correctly show badges only when there are actual highlights (mentions), not for all unread messages.

Changes

In getUnreadInfos() (src/app/utils/room.ts):

  • Extract notificationType to a variable for reuse
  • Add check for MentionsAndKeywords notification type
  • For MentionsAndKeywords rooms, only add to unread list if highlight > 0
  • Use highlight count as both highlight and total (since only mentions matter)

Before

  • MentionsAndKeywords rooms showed badge when total > 0 (any message)
  • Badge displayed total count (all unreads)

After

  • MentionsAndKeywords rooms show badge only when highlight > 0 (actual mentions)
  • Badge displays highlight count (only mentions)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

Rooms set to "Mentions and Keywords" notification mode now correctly
show badges only when there are actual highlights (mentions), not for
all unread messages.

- Extract notificationType to a variable for reuse
- Add MentionsAndKeywords check that only counts highlights
- Badge count shows highlight count, not total unread count

Fixes cinnyapp#2583
The previous fix only applied during RESET (initial load, sync).
Live timeline events still used getUnreadInfo() directly, which
would show badges for all messages, not just highlights.

Now handleTimelineEvent checks notification type and only shows
badge for highlights when room is set to MentionsAndKeywords.
@u9000-Nine
Copy link
Collaborator

@u9000-Nine u9000-Nine closed this Mar 18, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rooms set to "Mentions and Keywords" still show badges for all messages

2 participants