[JDEV] Determining nicknames...?

Sebastiaan Deckers cbas at screaming3d.com
Fri Apr 25 04:14:12 CDT 2003


Steve Blinch wrote:

> Hi all,
>
> I just had a quick client implementation question.
>
> What is the correct way to obtain the nickname for a contact in your 
> roster?  When working with the ICQ and MSN transports, it appears that 
> the nickname is sent in the "status" element of the presence packet. 
> When working directly with plain-Jabber contacts (and apparently with 
> AIM as well), the "status" element actually contains the user's 
> plain-English status message, not his nick.  Am I missing something 
> here?  Is there any reliable way to determine the nick, regardless of 
> what network the user is on?
>
> Conversely, I didn't notice any way to set the nick for your own 
> Jabber account... although it's apparently possible.
>
> I've pored over the docs, but I haven't found any related 
> documentation.  If I've overlooked something obvious, please *do* tell 
> me to RTFM... (but a pointer to the correct document(s) would be 
> helpful.. :)
>
>
> Regards,
> Steve Blinch
>
> webmessenger at blitzaffe.com
> http://webmessenger.blitzaffe.com


Jabber does not allow you to push your nickname onto someone else's roster.
A user specifies a nickname for his contacts.
A user also publishes his nickname in his vCard ( 
http://www.jabber.org/jeps/jep-0054.html ).
Some clients automatically retrieve the vCard when adding a new contact 
to the roster to find the nickname that contact has published, and then 
store it in the roster <item> name attribute.
Other networks (MSN, ICQ) do allow users to push their nicknames to the 
roster of their buddies, but transports can not / should not change the 
Jabber user's roster.  So the arguably best solution was to put the 
nickname in the status message.  (FYI, some clients use this trick to 
allow pushable nicknames from transpors -- but it's just a trick, not 
the protocol.)

There is another way to set your own nickname: by registering with the 
JUD. ( http://www.jabber.org/jeps/jep-0077.html )  But this is not a 
practical format so most clients use the vCard.

-- 
Sebastiaan




More information about the JDev mailing list