© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago•
5 replies
Cyber Grandma

How to link users to presence connections ?

Hi,

I'm making a lobby system (See picture for schema)

Basically I would like to tie users connected to the Presence room of a given lobby to the lobby_player table. Because if a user isn't connected live, then it shouldn't count as part of the players.

My current idea is to have a cron job running every minute and deleting players from lobby_players where they are not part of the lobby's presence room.

Another idea would be to have an event triggered whenever someone disconnects from the Presence and remove the respective row in the table.

But currently I don't see how I could do that, it seems like we don't really have control over what goes on in Realtime channels.
image.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How can Apple users link accounts?
SupabaseSSupabase / help-and-questions
3y ago
Presence
SupabaseSSupabase / help-and-questions
4y ago
How to track concurrent connections
SupabaseSSupabase / help-and-questions
13mo ago
how to get users
SupabaseSSupabase / help-and-questions
14mo ago