You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like my client to update a field in my database after joining a presence channel using the Track method.
I accidentally created a race condition bug between my client application and part of my back-end where the back-end service saw that a database field was updated and it reacted, getting the current presence state for the channel, seeing it was empty, and then doing cleanup.
I want my client to deterministically wait until the Track message has been successfully received by Supabase.
Describe the solution you'd like
The Track (and Untrack) methods should return a Task that can be awaited.
Describe alternatives you've considered
I tried adding my own application logic to wait for a presence sync where I saw my own user, but the presence sync event is triggered from the library locally when calling Track, so that's not the same as confirming the server received it.
Feature request
Is your feature request related to a problem? Please describe.
I would like my client to update a field in my database after joining a presence channel using the
Track
method.I accidentally created a race condition bug between my client application and part of my back-end where the back-end service saw that a database field was updated and it reacted, getting the current presence state for the channel, seeing it was empty, and then doing cleanup.
I want my client to deterministically wait until the
Track
message has been successfully received by Supabase.Describe the solution you'd like
The
Track
(andUntrack
) methods should return aTask
that can be awaited.Describe alternatives you've considered
I tried adding my own application logic to wait for a presence sync where I saw my own user, but the presence
sync
event is triggered from the library locally when callingTrack
, so that's not the same as confirming the server received it.Additional context
The Supabase realtime-js library has
Track
andUntrack
methods that return a Promise.The text was updated successfully, but these errors were encountered: