Stop reading the org's system member as the web-chat visitor

FixMediaService
Shipped
August 19, 2026 at 6:49 AM UTC
Author
Kamo
Commit
3729f10

Four reported faults, one cause. A widget visitor has no Member, so the org's SYSTEM member — the owner, who works the queue — stands in for them as the ticket's requestor and as the author of their messages. - The accept popup never offered a marketing chat. The claimable-ticket predicate refuses to offer anyone their own request; on a widget ticket that read as the owner's own. An in-app ticket has a real requestor, which is why those popped fine. - The chats list could not badge one. getChatSessions counted "messages not written by me", and the visitor's messages ARE written under that member — so, zero, always. Now it applies the same authorship-ambiguity rule getUnreadCountsByMember has, which is why the ticket list disagreed. - A visitor's message reached only the system member, and without the ACTIVITY fields the chats list filters on, so an agent who had joined the chat was told nothing at all. - History named the visitor after the member their messages are stored under, so both halves of the conversation read as the same support person. Presence gets a reconciliation sweep. Only an observed close was ever announced; a socket that merely stopped (tab killed, laptop asleep, network gone) aged out of Redis silently, so a visitor who LEFT stayed green until the agent reloaded while a visitor who returned turned green at once. A heartbeat for a key that has gone now revives it, so the sweep is not a one-way door.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing