Skip to content

feat: Add friends and game invites #8

Description

@touficbatache

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    📋 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions