Route getChatSessions' unread ambiguity through OwnAuthorshipAmbiguity

FixMediaService
Shipped
August 26, 2026 at 4:43 AM UTC
Author
Kamo
Commit
df51ca5

MediaController.getChatSessions hand-rolled the pre-extraction version of the "was this written by somebody else?" rule (rowVisitor != null && callerId **************** which only ever covered the public web-chat case. A SOCIAL session's visitor messages are stored under the connection owner for the same reason a web-chat visitor's are stored under the org's system member, so that branch never tripped for SOCIAL rows and the "not written by me" count returned 0 for the connection owner's own Chats list rows — while the nav badge, already routed through OwnAuthorshipAmbiguity one layer up in **************** counted correctly. Same conversations, two disagreeing numbers, in the same feature. Resolves each SOCIAL guid's owner id per page (socialOwnerByGuid, alongside the existing publicChatOwnerByGuid) and delegates the per-row decision to a new rowOwnAuthorshipIsAmbiguous helper that calls OwnAuthorshipAmbiguity .isAmbiguous directly, so the rule is stated once and this call site can no longer drift from it. Adds **************** unit-testing the new helper directly (same pattern as OutboundKindTest) — including regression coverage for the two behaviors that must not change: an in-app support ticket filed by its own viewer stays not-ambiguous, and a public web-chat session viewed by its owner stays ambiguous.

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