KamoCRM

Support tickets need member-agnostic unread counts

Fixkamo-shared-library
Shipped
25 ஏப்ரல், 2026 அன்று 11:47 PM UTC
Author
Kamo
Commit
8031ad4

Visitor messages on support tickets are stored under the same systemMember that the agent authenticates as, so the existing CHAT-session unread queries — which exclude m.member.id = :memberId — always returned 0 for support sessions. The ticket-list badge therefore never appeared. Adds countAllInSession + countAllInSessionAfter (no member filter) and routes SUPPORT_TICKET sessions through them in getUnreadCountsByMember. The agent calls markAsRead after every reply, so lastViewed always points at their most recent send and only true visitor messages end up counted as unread.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing