Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make sure games are deleted in specific cases #3

Open
touficbatache opened this issue May 13, 2024 · 1 comment
Open

feat: Make sure games are deleted in specific cases #3

touficbatache opened this issue May 13, 2024 · 1 comment

Comments

@touficbatache
Copy link
Owner

touficbatache commented May 13, 2024

@touficbatache
Copy link
Owner Author

It's easy to detect presence in Firebase, especially using Functions & Realtime DB, which we both use : https://firebase.google.com/docs/firestore/solutions/presence

Simply, if we detect disconnection :

  • if game status is waiting (has not yet started), check if every user is disconnected => delete it
  • if game has started but someone is disconnected, show it in the app, maybe with a wifi off icon on the player's image (todo in Svelte)
  • if game is public, has started, hasn't yet ended, and all are disconnected => remove it from watchable games

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Todo
Development

No branches or pull requests

1 participant