Retrieving the presence status of an unavailable user

Hello,

Jive Messenger gives the possibility to include a status text to your last unavailable presence, so that when other users check your presence, they see your status (e.g. “I’'m on holidays”).

I didn’'t find how to retrieve that status text with Smack… I tried to use the roster.getPresence()[/b] but it just returns me a null pointer. I also found this was defined in the Smack API :

public Presence getPresence(String user)[/b]

Returns the presence info for a particular user, or null if the user is unavailable (offline)

But on the other hand, the admin console manages to display te status text when a user switch to unavailable with a status…

So how do I check the last status of a user who is unavailable ??

Thank you !

Olivier

Hey Olivier,

You raised a good point. We need to add support for this feature to Smack so the solution could be complete. I created the issue SMACK-74 so feel free to vote for it to raise its priority.

Meanwhile, you may want to try using a PacketListener to process the unavailable presences.

Thanks,

– Gato

Thank you Gato ! I voted for it !