How Often does OnStatusUpdate get called?

Nerfski
✭
in Photon Chat
basicly im working with Photon Chat & Playfab. i got the whole add friends thing and such, Im wondering When does the Status Update get called? everytime a chat user status changes? or every 5 seconds? im wondering cause i need to know what to set a player status's When A player opens Up the friend menu.
Another thing that may be useful is to Call a GetFriendStatus Function. that would be really useful and if there is i dont yet know about it.
-cyro
Another thing that may be useful is to Call a GetFriendStatus Function. that would be really useful and if there is i dont yet know about it.
-cyro
0
Best Answers
-
Hi @Nerfski,
As stated in the documentation here, OnStatusUpdate will get called only when the status changes and nor periodically.Another thing that may be useful is to Call a GetFriendStatus Function.
There is no such thing.
I'm not sure but could you test that adding friends (chatClient.AddFriends) does not trigger an 'initial' OnStatusUpdate per friend?5 -
I'm not sure but could you test that adding friends (chatClient.AddFriends) does not trigger an 'initial' OnStatusUpdate per friend?
i did a bit of testing and found that whenever you add a friend and that friend's status changes it does get their status. thank you for answering my question because i can use this as the GetFriendStatus method.
-cyro0
Answers
-
Hi @Nerfski,
As stated in the documentation here, OnStatusUpdate will get called only when the status changes and nor periodically.Another thing that may be useful is to Call a GetFriendStatus Function.
There is no such thing.
I'm not sure but could you test that adding friends (chatClient.AddFriends) does not trigger an 'initial' OnStatusUpdate per friend?5 -
I'm not sure but could you test that adding friends (chatClient.AddFriends) does not trigger an 'initial' OnStatusUpdate per friend?
i did a bit of testing and found that whenever you add a friend and that friend's status changes it does get their status. thank you for answering my question because i can use this as the GetFriendStatus method.
-cyro0 -
I'm not sure but could you test that adding friends (chatClient.AddFriends) does not trigger an 'initial' OnStatusUpdate per friend?
I am not getting an initial status update on a friend after calling AddFriends. I need this to check if a user is offline before performing other game logic. I am testing this with a variety of friends, online and offline, editor and standalone build. I have tried implicitly and explicitly implementing the OnStatusUpdate callback from IChatClientListener. Nothing comes back, ever.public string FriendToAdd; public static void AddFriend() { var friend = new string[1] { FriendToAdd }; _client.AddFriends(friend); } public void OnStatusUpdate(string user, int status, bool gotMessage, object message) { Debug.Log(string.Format("OnStatusUpdate:\r\nUser:{0}, Status:{1}, Msg:{2}, Message:{3}", user, status, gotMessage, message)); }
0 -
0