riyadhafraa ce1fb84365 Task #43: Stop counting system messages as unread
Problem: Group rename, member-add, and member-remove events insert rows
into the messages table with the actor as senderId, which made them
increment the unread badge for everyone else just like a normal chat
message. That created notification noise for routine admin tweaks.

Fix: In `artifacts/api-server/src/routes/conversations.ts`, the
`buildConversationDetails` unread count query now restricts to
`messages.kind = 'user'`, so only real user chat messages contribute to
the unread count returned for the conversation list / bell badge.

Notes / non-changes:
- The conversation-list "last message" preview is intentionally left
  unfiltered, so the most recent activity (including system messages)
  still surfaces in the list — matches the task's "Done looks like".
- Push-style chat notifications (`createMessageNotifications`) are only
  invoked from the user send-message route, never from
  `insertAndEmitSystemMessage`, so no additional guard is required for
  system events today.
- Frontend chat.tsx already renders system messages distinctly and
  shows them in the list preview; no UI change needed.

Replit-Task-Id: 3734d73b-2df7-4f32-9655-6c7a9e23536c
2026-04-21 10:35:54 +00:00
2026-04-18 02:00:09 +00:00
2026-04-18 02:00:09 +00:00
2026-04-18 02:00:09 +00:00
2026-04-18 02:00:09 +00:00
S
Description
No description provided
139 MiB
Languages
TypeScript 69.4%
JavaScript 29%
CSS 0.6%
Shell 0.6%
Dockerfile 0.2%
Other 0.2%