How to get someone''s status by name ...?

Hello

How can I retrive someone’'s status (online, offline, away, xa …) by its login withouot having his contact in my roster ?

For example, I’'m connected to jabber server and my roster is empty … I want to know if a user “Ted” is online ?

Thanks.

Hey Dmitry,

AFAIK, the XMPP requires a user to be subscribed to the presence of another user in order to learn its status. IMO, it’'s a privacy issue. The idea is that any user may control who is allowed to see him when he is online.

However, the server that you are using might let you find out the presence of other users even if they hadn’'t authorized you.

Regards,

– Gato

Thanks.

So, to discover someone’'s status I need to use a SEARCH with his JID as a parameter, right ?

Hey Dmitry,

Searching for a user will just answer some basic data about the user but not his presence. You can read this url=http://www.jabber.org/jeps/jep-0055.htmlJEP /url for more information.

As I said before, you will need permission from the user you want to get his presence status. Other option is to rely on non standard extensions that a server might have and use them for getting the user status.

Regards,

– Gato