User Offline/Online status not working in proper way even if both user are friend and online playfab

User status is not getting broadcasted to all friends of that user, and showing as Offline even if all are online.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Okhla,

    Thank you for choosing Photon!

    How are you adding friends?
    How are you setting UserIDs?
  • Using Playfab for user management and facebook SDK for facebook login.
  • If two users are friends on facebook then they are also friends in playfab.
  • JohnTube
    JohnTube ✭✭✭✭✭
    I mean tell us what are you doing in Photon Chat, that's what this is about right?
    Show us code snippets of authentication/connection, adding friends and status update.
  • public void OnStatusUpdate(string user, int status, bool gotMessage, object message)
    {
    GameManager.Instance.friendsStatuses.Add(new string[] { user, "" + status });
    }
  • I have a working codebase, everything is working, but i always get friend status as Offline even if all friends are playing that same game.
    I think status of user is not getting broadcasted on his friends app.
  • JohnTube
    JohnTube ✭✭✭✭✭
    OK, since you did not share the code I requested here is what you should know:

    - Photon Chat UserID should be the same as PlayFab ID.
    - You should add friends using their PlayFab ID.
    - Friends should not explicitly make their status as invisible or offline.
  • Class ExitGames.Client.Photon.Chat.IChatClientListener

    public void OnStatusUpdate(string user, int status, bool gotMessage, object message)
    {
    GameManager.Instance.friendsStatuses.Add(new string[] { user, "" + status });
    }
  • JohnTube
    JohnTube ✭✭✭✭✭
    how do you authenticate and connect to Photon Chat?
    how do you add friends in Photon Chat?

    if you try explicitly changing status (using SetOnlineStatus), do any of your friends get the status update?