-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Presence Status not changing after accepting friend request (first conversation) #409
Comments
I'm using v3.0.1 |
Can you post the call trace from "fnName.split is not a function" (just click on the little triangle).
So afterwards everything wents smooth? |
Hey Klaus, thanks for replying. Ok, I changed some behaviors of the library, so the friend request is auto accepted at both sides, and this error: "TypeError fnName.split is not a function" is due to I commented a function, but it has nothing to do with the issue exposed above. This happened the very first time I started using the library (5 days ago) before doing changes to the code. Finally, yes, this presence status bug only happens after the friend request, If both users log out and log in again then changing presence status works fine. So, don't worry about the TypeError my friend. Yesterday, I spent hours trying to debug onPresence function, and I could noticed that the issue probably is in this part:
I'm pretty sure about it because the online status got stuck on both sides, The first status I received from the other user is 0 (offline), followed by 5 (online) and finally the current and true user status, as you can see in one of the images (console, status 0, 5 and 3) but the status icon doesn't change, it just keeps online status. I tried passing the user status in the along with the friend request, so instead of setting the status to online if show is empty, I just set the status to buddy_status (variable that contains current status of my buddy). It works halfway, because the buddy appears on my list with the current status, e.g: 3 (Away) but after that, when I try to change the status again on any side it does't totally works, some statuses change but another ones don't. I did receive each presence status change message in my console (like shown in the images) but I think it's a issue related to the status refresh on the buddy list. |
I think I fixed this bug Klaus, presence statuses are changing after the handshake, it's working good so far. |
Can you provide a patch? That would be awesome. |
Hey Klaus, Sure, I'll provide a patch. |
Any update? |
Hey Klaus, I'll be posting the fix that worked for me. |
@citerio If you like you can post it right here. |
Hi there, Presence Status is not changing after the friend request is accepted and both users start chatting for the first time. It only changes after logging out and logging in again. When user A changes his/her presence status (e.g: from Online to Away) the user B receives the messages (Presence (A@localhost): 3) but the user A icon and status are still Online (on B friends/buddies list). This only happens in the first conversation after the friend request. You can check out the images below;
Status:
Online=5
Chatty=4
Away=3
Extended Away =2
Do not Disturb=1
Offline=0
User A = Citerio
![userciterio](https://cloud.githubusercontent.com/assets/9136205/20552217/21b5a002-b11f-11e6-9c40-edf261974dca.png)
User B = Nick
![usernick](https://cloud.githubusercontent.com/assets/9136205/20552218/21b8e686-b11f-11e6-9634-c8619d67c27b.png)
You can see Presence status in the console and the Buddy Status Icon
Citerio should appear as "Do not Disturb" and NIck as "Extended Away", but Both Citerio and Nick appear "Online" to each other.
The text was updated successfully, but these errors were encountered: