Status update not updating. ( always online )

I found that some players' state doesn't change. They appear to be always online.
Even after changing the Auth Type from CustomAuthenticationType.None to CustomAuthenticationType.Custom the state won't change.

Is there a way to reset the server or the player's state?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Ralph_K,

    Photon Chat's users online status is not directly related to custom authentication.
    Photon Chat online status works based on UserId.

    Also, by default, the user's online status is not online unless you explicitly set it to that value.

    Could you share with us more details:

    - Photon Chat version (which SDK are you using?)
    - Code snippet(s) of how you use online status
  • I'm using PUN Classic 1.99

    setting online status to online in OnConnected() callback.
    never setting the status to offline cause is thought this gets handled by timeout.
    Is there a best practice when to set the status to offline?

    thanks.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited September 2019
    Hi @Ralph_K,

    The server will disconnect a user after a timeout.
    Once disconnected, the user's status will be offline (0), this will be broadcast to all connected users who have added him as a friend using his UserId, unless his status before disconnection is invisible (1) or offline (0).

    So in your case, make sure you are waiting enough time for the user to be disconnected from the server.
    Make sure you are using unique correct UserId values on each client.
  • Hi,

    the user ids are unique. Setting the state while the app is in the foreground also works fine. But when i quit the app the user is online forever.
    JohnTube said:


    Once disconnected, the user's status will be offline (0), this will be broadcast to all connected users who have added him as a friend using his UserId, unless his status before disconnection is invisible (1) or offline (0).

    Looks like this stopped working.

  • JohnTube
    JohnTube ✭✭✭✭✭
    H @Ralph_K,

    I tested this without any issues.
    If you think there is a problem with this, send an email to developer@photonengine.com with minimal reproduction steps + AppId + AppVersion + link to this forum discussion.