-
Notifications
You must be signed in to change notification settings - Fork 86
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
While reload page not get roster presence? #28
Comments
I have the same issue. When connecting, the roster comes back with presence. When resuming, the roster comes back but without presence. I'm thinking of storing the roster in local storage on each page unload and bringing it back up when a resume happens... |
Sorry but this won't work as you expect. That's because you're not doing a new login upon reconnecting. Thus you have to store the state of the roster on your own and restore it after resuming. Local storage might indeed be an option to handle this. |
Unfortunately, there is one severe issue here, even when storing the roster in local storage for page transitions. When adding a user to the roster after resuming, you will not receive the new user's presence information, even if they are online. |
How are you adding this new user? Am 12.04.2012 um 22:48 schrieb Eric Colman reply@reply.github.com:
|
Here is the code, basically getting a subscription, gathering all groups the user is going to be in and already in, then sending off IQ msg: function addUserToGroup(xid, nickname, subscription, groups) {
} function sendSubscribe(to, type) { function sendPresence(to, type, show, status, checksum, limit_history, password, handle) {
} function listGroupsForUser(xid) {
} |
Of course you will receive presence only after the recipient has acknowledged your subscription request. But given those packets were sent correctly this should work then. Am 13.04.2012 um 16:37 schrieb Eric Colman reply@reply.github.com:
|
Hello,
While Login , i can get Presence of all rosters users. //login time
However i reload my page i can not get rosters presence, // that time connection resume
/**
function handlePresence(aJSJaCPacket)
**/
@sstrigler has become available
@cstar has become available......
etc...
Please help me how to get all roster users presence , Like available or offline or away etc...
Thanks
Nishant
The text was updated successfully, but these errors were encountered: