[JDEV] Yahoo transport and who's available

Max Horn max at quendi.de
Mon Sep 18 05:36:08 CDT 2000


At 2:54 Uhr -0400 16.09.2000, mallum wrote:
>Hi all;
>
>Im having problems getting the yahoo transport to tell me who's available.
>(Im using Perl with the Net::Jabber module) and the 1.0 Jabba Server release.
>
>I can register the Yahoo transport fine. I then send an available presence to
>the returned ' yahoo.server.org/registered?username=XXXXXX&pass=XXXXXXX '
>JID, which appears in my roster.

This is wrong (unless I misunderstand you). The Yahoo transport sends 
a <presence type="subscribe"/> to you - i.e. a presence subscription 
request. You then have to send back a <presence type="subscribed"/> 
(notice the 'd'!) to it. Then it should work.


>I can the send and recieve messages with
>yahoo. However I never seem to reieve presence messages from any subscribed
>(both ways) clients, so I cannot tell who is and who's not online.

That is propably because Yahoo-T is not subscribed to you, thus 
doesn't know you are "online" - and thus doesn't send online/offline 
etc. events to you.


<snip>

>  yahoo.server.org/registered?username=XXXXXX&pass=XXXXXXX
>  yahoo.server.org
>  mallum at yahoo.server.org
>
>(where mallum is my login name for the normal jabber transport)

Hm. The first entry is 'normal' for transports. It's used to allow 
auto-login to your Yahoo account once you send presence to this 
roster item (that is, usually on login)


>Also how does should my code know that a roster entrie is another transpoort
>and needs a prensence sending to it ?

1) The only way to find out if a roster item represents an agent is 
to match it to the list of agents returned from the server.

2) You do not need to send presence to it, though. Your client has to 
send a <presence/> tag (it can have a type/status/show flag etc., but 
*no* 'to' field)  once at the start if it wants to get presence from 
others (see the JPG for more info on this).
In general, sending a presence w/o a 'to' field means that everyone 
who is subscribed to you gets this presence from you - no need to 
iterate over your roster and send it to each subscriber manually.



HTH,

Max/Fingolfin
-- 
-----------------------------------------------
Max Horn
C/C++/Internet Development

email: <mailto:max at quendi.de>
   web: <http://www.quendi.de>
phone: (+49) 2621-188947




More information about the JDev mailing list