KamoCRM

Use shared EmailWebSocketContext for real-time unread badge updates

Fixkamo-internal
Shipped
17 மார்ச், 2026 அன்று 9:41 PM UTC
Author
kamo
Commit
04f1763

MailButton was creating a duplicate WebSocket connection via useEmailWebSocket() and optimistically incrementing the unread count. Now uses the shared useEmailWebSocketContext() and re-fetches the actual count from the server on each notification, consistent with how FolderSidebar and MessageBrowser work.

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