Files
Narasimha-sc 4a81be31c4 ui: include unread support chats in the chat list unread filter
A group where a member is waiting in a support chat has something to read - the
chat list row already flags it - but the unread filter did not list it, so a
moderator filtering for unread silently skipped the member waiting on them.
chatStats.unreadCount is filled by a query scoped to the main conversation
(group_scope_tag IS NULL), so unreadTag cannot see support scopes at all.

Match on Chat.hasUnread, which adds supportUnreadCount to unreadTag, gated on
the chat not being muted to "mute all" - so a support chat waiting in a fully
muted group does not put it in the filter, matching what the profile's unread
count does with that group. Marking such a chat unread by hand still lists it,
through unreadTag's unreadChat branch.

Two consequences of taking supportUnreadCount whole are deliberate. For a
moderator it is membersRequireAttention, which counts members pending approval
as well as unread messages, and only approving or rejecting clears those - so
the group stays listed until the moderator acts. And mentions-only chats still
count support unread, on the view that mentions-only is a statement about group
chatter and the user's own line to the admins is not chatter.
2026-09-05 11:38:41 +00:00
..