chatClient.SetOnlineStatus not sending online status

benbenmushi
edited March 2018 in Photon Chat
Hi,

I recently implemented OnlineStatus changes for our player in the chat.
Everything was working great until recently.

The ChatClient stoped sending & receiving thoses events.
The code goes to:

chatPeer.OpCustom(ChatOperationCode.UpdateStatus, parameters, true);

without problem but no reception is triggered for any players present in the channel when it is expected to call:

IChatClientListener.OnStatusUpdate

for everyone in the channel.

The other messages are working great without problem.

Has anyone idea of what might be causing this kind of behaviour ?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @benbenmushi,

    Thank you for choosing Photon!

    Everything was working great until recently.
    Did you change anything on your side? A client update maybe? Did you change AppVersion in the new client?
  • benbenmushi
    edited March 2018
    Hi @JohnTube,

    What changed is that I started using thoses Status.
    The connect routine hasn't changed, the appVersion is still the same.
    How comes the Messaging is working and not the StatusUpdates ?
    I can connect, send a message, receive it in 'IChatClientListener.OnGetMessages'
    but nothing happen Updating Online status.

    Edit: no update on the sdk neither
  • JohnTube
    JohnTube ✭✭✭✭✭
    How do you add friends that you expect to get status updates from?
  • I was not aware that friendlisting was required in order to get updates... that explains a lot.

    I'm not receiving my own status updates, it is expected ? Do I need to friendlist myself ?
  • benbenmushi
    edited March 2018
    Thanks @JohnTube

    I was using this feature incorrectly. I'll just undo my implementation (wich was kinda hacky) and use regular messages
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited March 2018
    I'm not receiving my own status updates, it is expected ? Do I need to friendlist myself ?
    Yes this is the expected behavior. By design, you receive status updates only from users added as friends using their UserId. Including yourself.
  • Thanks for thoses usefull informations @JohnTube

    I'm surprises I managed to get any StatusUpdates because I never used any FriendList features. Yet I'm sure it was working somehow when I tested it on my computer.
    I'm using a trick to test network feature on the same project without having to sync up 2 different projets, I symlink the Asset folder in 2 different projets so when I make a change it applies to both instances. The thing is that I sometimes connect with the same userId for both instances.
    In that configuration I do receive StatusUpdates for 'myself' without using any FriendList functions. I tested in the same configuration but with different userId, and this time I dont receive StatusUpdates.

    This is how I ended up implementing around StatusUpdates without using the friendList system and get results anyway.