powered by Jive Software

Roster presence for multiple resources

Hello guys!

Is there a way to handle presence using roster events for multiple resources? I.E. I have a buddy in my roster, he opens two different clients, I’m getting USER_PRESENCE_UPDATED and it works fine. But in case buddy closes one of the resources I’m getting USER_PRESENCE_UPDATED with OFFLINE status for my buddy. (That’s becase now XIFF roster operates only using bareJIDs).

Or I should not rely on roster events and handle presence only via Presence stanzas?

Hope this makes sence

Thank you,

Mike.

Just posting if anyone looking for same answer: Currently Roster class is not supporting multiple resources for one item (at least I did not found it) so workaround may be to use Presence stanzas and manually track connected resources.

Would you happen to have a reference to the RFC specification what it says about this?

XIFF should follow the spec as close as possible… That is, should in the future, currently not so sure…

Anyhow this might be something that could be implemented within the given class if the functionality is desired.

I can’t find this in RFC, but you can check Roster class from Smack project

http://fisheye.igniterealtime.org/browse/smack/trunk/source/org/jivesoftware/sma ck/Roster.java?hb=true