Question about Friend Requests

Options
Hi,
Working on a friend list system and I've hit a bit of a stumbling block. Adding friends to a friend list and checking on their status, all of that I can do pretty quickly. But how would I go about a system where one player "asks" another player if they can add them to their friend list, and wait for an approval? Otherwise I've made a one-sided user stalking machine.

Comments

  • Msico
    Options
    I am able to rig up the Photon Chat private message system in such a way that does this, and made it where if one player removes a friend from their list it then removes them from the other person's list as well. Is there another way to perform those tasks (outside of both players being in the same room at the time) that I am overlooking?
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2018
    Options
    Hi @Msico,

    Thank you for choosing Photon!

    tl;dr

    you need to implement this yourself yes.

    ---

    Photon does not have a two-way friends system (facebook style) where:

    - you would first send a request for friendship that the needs to be accepted in order to add each of the two users (sender and receiver) to the other's friends list.
    - when you remove a friend you also remove yourself from his friends list

    Photon Chat's friends feature is more like twitter's followers with the missing piece: you don't get "the list of users whose friends lists you're in" ("followers") you only get the list of friends you have ("following").
  • Msico
    Options
    Thanks John! I've gotten it working via a quick rig of Private Messages that the player cannot see but that trigger the adding/removal/redundancy effects I was looking for.
  • Shivu98
    Options
    Hey @Msico can I have your script or GitHub link of your project if you don't mind? i have to implement such feature in my game and I want to know how you implemented it. Thanks a ton :smile:
  • So I see the thread a bit old, so just asking is it that still we can't implement the 2 way friend feature?