Build the sender's avatar URL from their org, not the request host

FixMediaService
Shipped
September 5, 2026 at 3:49 PM UTC
Author
Kamo
Commit
4b6522f

A chat notification's senderAvatar was resolved from X-Forwarded-Host, falling back to the server name. Both kamo-internal's BFF and APIService reach this service by its Kubernetes name, so that host is a single label — and themeDomainForHost rightly refuses to invent a domain from one, returning null. So the URL was never built: every notification and every push still carried an empty senderAvatar, and a phone raising a floating chat head from a push had nothing but initials to draw with. The member's own organization decides the theme host now, via the root domain OrgDomainResolver already resolves for deep links; the request host stays as the fallback for a caller that really did arrive from the edge. Organization.domains is lazy and every caller runs inside createMessage's transaction.

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