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: Add friends and game invites #8

Open
touficbatache opened this issue Dec 16, 2024 · 0 comments
Open

feat: Add friends and game invites #8

touficbatache opened this issue Dec 16, 2024 · 0 comments

Comments

@touficbatache
Copy link
Owner

Linked to touficbatache/SecretHitlerSvelte#3

How it could potentially work:

  1. No followers/following complexity => just friends or not: send friend request, if accept then both are friends.
  2. Use Firestore to store friendships in the form of documents:
    a. Document name: "FRIEND1_FRIEND2" where FRIEND1 would be asker ID and FRIEND2 receiver ID.
    b. Document contents: status of request, sent date, accepted date, common game IDs (maybe not needed cuz we can query it from Realtime DB anytime) to have a list of common games and count (maybe even make friendship badges?)
  3. Call API to send invite => use Realtime DB and listen (need to store them temporarily and need rapid access)
  4. Call API to accept invite => update Realtime DB (remove invite) and join game
  5. Add ability to cancel invite by calling API

Originally posted in touficbatache/SecretHitlerSvelte#3 (comment)

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