[ejabberd] Any way to get the Nickname of the 'from' on some Presence 'Subscribe' request?

Franky Orson franky.orson at gmail.com
Wed Apr 27 11:54:56 MSD 2011


I've found this Ejabberd JIRA (User Nickname support) opened
and it seems like this won't be implemented until 3.0.x.

Is there any way to still get the nickname of some user sending some
presence 'subscribe'?

Right now, it is possible in our case that the 'user' part of the JID does
not contain the full name of the user, since no space is allowed so we
wanted to rely on the nickname which is always set in our case.

Does anyone know of any tips on how this would be possible? Since ejabberd
stores the nick of the sender in his/her own roster on the server, it should
be possible to sent it over to the invitee, but *what am seeing is the
opposite* - the invite (to nick contains his/her own nickname where
obviously a client would already know his/her known nickname for him/herself
since it sets it or can retrieve it...Why isn't it being sent as part of the
'from' as the resource at least? is that because of client compatibility and
the fact there is no nickname mentioned in RFC
again, not sure why it is set on the 'to' field as part of the invitee then
- why not both?

This is what I get on the client receiving the subscription request (to):
<presence *from*='grep at someHostA.com' *to*='dog at someHostB.com/some dog
nickname' id='13' type='subscribe'/>

Would really appreciated some help on this - Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20110427/5b6d28f4/attachment.html>

More information about the ejabberd mailing list