Skip to content

fix: announce a presence channel user once across all of their sockets - #89

Merged
jshah4517 merged 4 commits into
masterfrom
presence-dedupe-by-user
Oct 13, 2026
Merged

jshah4517 merged 4 commits into
masterfrom
presence-dedupe-by-user

Conversation

@bytestream

Copy link
Copy Markdown
Member

Previously we were announcing member_added every time a new tab was opened, and member_removed every time a tab was closed or orphaned row garbage collected. This changes that behaviour so it only does it once if there's a connection live elsewhere. It mimics pusher-js behaviour.

bytestream and others added 4 commits October 13, 2026 14:44
Two sockets of the same user joining at the same time could each find the
other and neither announce the user. Announce from the user's earliest socket
on the channel instead, as Laravel Reverb does, so exactly one of them does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jshah4517
jshah4517 merged commit 5176851 into master Oct 13, 2026
24 checks passed
@jshah4517
jshah4517 deleted the presence-dedupe-by-user branch October 13, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants