Skip to content

Is there a way to update presence without triggering a "leave" event right after? #26748

Answered by JOsacky
JOsacky asked this question in Questions
Discussion options

You must be logged in to vote

I figured out that whenever the presence is updated, a leave event and a join event happen at the same time. This is expected behavior even though it is a bit confusing. You should process the leave events first and then the join events so that your presence cache is accurate after an update. There was a bug in the kotlin library where join events were processed first which caused presence to always be empty for updates. I submitted a PR to fix, but make sure this is happening in whatever client you use realtime in. PR to fix: supabase-community/supabase-kt#607

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JOsacky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant