KamoCRM

Publish mailbox-change events so the mail views stop polling

FeatureEmailService
Shipped
6 ஆகஸ்ட், 2026 அன்று 12:37 PM UTC
Author
Kamo
Commit
19463a8

The folder tree, conversation list and message list each ran their own 30-second timer, reloading on the chance that something had moved. The WebSocket already told them when mail arrived, but that is only one of the ways a mailbox changes — reading a message in Roundcube or on a phone, moving it, deleting it, or expunging it all left the UI wrong until the next tick. EmailMailboxChanged says a folder is no longer what you are showing, and carries the reason so a consumer can ignore kinds it does not care about. Published on email.changed.<addr> and relayed to **************** from the IDLE listeners (arrival, expunge, flag change) and from the mark-read, flags, move, delete, spam, send and draft endpoints. Deliberately not folded into EmailUnreadPublisher: that one owns a count, so it has to reach the provider and coalesce bursts to stay affordable. This carries no count and reads nothing, so it is cheap enough to send on every change and must not wait behind a window a count needs. A move reports no folder because it touches two and the source is not always known to the caller — consumers treat that as "reload whatever you are showing".

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