Earde

Proposal: expose connection state to client extensions

by u/tolwiz[MOD][ADMIN]1 mo ago2 comments
Extensions currently have no reliable way to distinguish an active connection from reconnecting or offline state. Exposing a small connection-state API would let integrations defer network-dependent actions instead of guessing from failed requests.
// 2 comments
Log in to join the discussion.
u/ansuzgardraiwo 1 mo ago
I can reproduce this when switching from Wi-Fi to Ethernet with the tab in the background. The new socket joins immediately, but the old presence entry survives until its timeout expires.
u/tolwiz[MOD][ADMIN] OP 1 mo ago
That sounds like the client reconnect path is faster than the server-side leave cleanup. We probably need presence replacement keyed by user/session rather than waiting for the previous transport to disappear naturally.