Pin which support queue a stranger's chat lands in

TestMediaService
Shipped
September 6, 2026 at 12:38 AM UTC
Author
Kamo
Commit
a4f96d3

resolveTopic decides where a visitor from a customer's website reaches a person, and every way it can go wrong goes wrong silently — a chat filed under a plausible-looking queue nobody is watching, with no error anywhere. That is not something to leave on inspection. Six cases: the configured topic beats the title the widget sent; a deactivated or no-longer-resolving one falls through instead of collecting chats; an unconfigured integration keeps the old title match; no integration at all still reaches the first active topic; and an org with no topics still says so plainly. resolveTopic is package-private for this. Every Docstor but the topic repository is left null in the fixture on purpose — if the method ever reaches for one, that is a failing test rather than a quiet dependency. Mutation-checked: dropping the active filter fails exactly the deactivated case.

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