Getting user presence

Hey all,

Is it possible to use the gateway for retrieving the status of a given user in AIM or any other of the supported public networks? I’‘d like to do this generally and not necessarily as a logged in user. I’‘ve used Smack quite a bit so I’‘m familiar with dropping into the APIs. It seems like it should be possible but I’'m not familiar with the details of how the gateway works.

Let me know if I haven’'t asked the question well.

Thanks!

Jay

Message was edited by: jayallen

jayallen wrote:

Hey all,

Is it possible to use the gateway for retrieving the status of a given user in AIM or any other of the supported public networks? I’‘d like to do this generally and not necessarily as a logged in user. I’‘ve used Smack quite a bit so I’‘m familiar with dropping into the APIs. It seems like it should be possible but I’'m not familiar with the details of how the gateway works.

Unfortunately, the answer is more or less no. For the bulk of these networks, you have to have permission to find out the status of another user. I’'ll try to go over all of them as best I can individually:

IRC: Assuming you connect to IRC in the first place, there’‘s no restriction on whose status you can look up. The IRC command ISON will tell you if a user is logged in and there’'s no such thing as access to this information in the land of IRC. However note that you have to be connected to the server in the first place.

ICQ: This one “depends”. There’‘s something called web presence in ICQ’‘s breed of the OSCAR protocol that permits you to do things like have an icon on your website to show whether you are logged in or not. Many folk turn this off however because, for some reason, it can be used to spam the hell out of folk. =/ I do not really understand the logistics of why having web presence automatically means that you will be spammed. Without web presence, you have to be logged in and the other person has to either have open permissions or have authed you to have access to their presence. By the same token, I don’‘t know exactly what occurs to allow folk to see your current logged in status when you search for them in ICQ’'s ‘‘add contact’’ stuff.

AIM: Just recently it looks like they added a similar web presence thing. However, I don’‘t know anything about it but I can’‘t help but think it’‘ll have the same issues as ICQ. AIM doesn’‘t do as much as ICQ in the permissions list area. Typically you add a buddy and you are done, no auth required. I don’‘t think you can just ask for a buddy’‘s presence though. If there is I’'ve never found it. =/

Yahoo: Not sure here aside from I’'ve never seen anything that lets you query a presence without being logged in. Yahoo is the protocol I know the least about of all of these.

MSN: MSN has a complex set of access controls that boil down to, unless the person has specifically given you access to see them, you aren’'t going to know their presence.

Long story short, you typically can’‘t do a lot on these networks until you are logged in as a specific account and you have added the other person as a ‘‘buddy’’ and they’‘ve accepted. Now, you can probably create an account on each service, register a jabber id with each service with said accounts,and have something in your code to add buddies first. It’‘s not ideal though and doesn’'t sound like what you were after.

On the other hand, if the gateway plugin already knows about the contacts in question, it could probably relay what it knows. In other words, lets say you have already have AIM user ninja and cat registered through the plugin and they are both logged in right now. The plugin could relay that knowledge on through some interface. Likewise, if ninja has kite, hat, and crazycat in his AIM buddy list, the plugin could relay the knowledge of those buddies back as well. I still don’'t think that is what you were after though.

Wow, thanks for the long and helpful reply - I learned a lot. Sorry it’‘s taken me awhile to respond, I had to read what you wrote a few times to make sure I understood what you were suggesting. It sounds like there isn’'t a really clean way to do it. I think what you suggested though would work:

Long story short, you typically can’‘t do a lot on these networks until you are logged in as a specific account and you have added the other person as a ‘‘buddy’’ and they’‘ve accepted. Now, you can probably create an account on each service, register a jabber id with each service with said accounts,and have something in your code to add buddies first. It’‘s not ideal though and doesn’'t sound like what you were after.

Let me go through it to make sure I understand what you’‘re saying. So I create an account on each service, register a jabber ID (probably one for each service), login to the jabber account then login/connect (right term?) to the gateway with the matching public IM account ID and password. Once I’‘ve done that I can see the status of anyone on the roster of the public IM account. If that’‘s all correct the question I’‘ve got is can I add someone to my public IM roster through the gateway? For example, add user AIM user cat to AIM user ninja’'s roster?

Thanks,

Jay

Hey,

I figured out the answer to my question, it was pretty simple. It’‘s just adding aimuser@aim.domain.com or whatever to my roster. However, I have another question - can I do the reverse and add an XMPP user to an AIM group? It’‘s seems obvious that the answer is no since that user is not registered in AIM but I thought I’'d ask.

Thanks,

Jay

jayallen wrote:

Hey,

I figured out the answer to my question, it was pretty simple. It’‘s just adding aimuser@aim.domain.com or whatever to my roster. However, I have another question - can I do the reverse and add an XMPP user to an AIM group? It’‘s seems obvious that the answer is no since that user is not registered in AIM but I thought I’'d ask.

Well, I mean if the other user is -also- logged in and registered, you could. But yeah, it has to use the person’'s own AIM connection as a conduit.