[jdev] Correct way to remove a nickname form a roster item

Mark Doliner mark at meebo.com
Thu Oct 5 12:25:36 CDT 2006


On 10/5/06, Michal vorner Vaner wrote:
> On Wed, Oct 04, 2006 at 08:20:02PM -0700, Mark Doliner wrote:
> > Hi, I'm wondering what is the correct way to remove a nickname from
a
> > roster item?
> >
> > Method 1:
> > <iq type='set' id='lalala123'><query xmlns='jabber:iq:roster'><item
> > jid='whoever at example.com'><group>Buddies</group></item></query></iq>
> >
> > Method 2:
> > <iq type='set' id='lalala124'><query xmlns='jabber:iq:roster'><item
> > jid='whoever at example.com'
> > name=''><group>Buddies</group></item></query></iq>
> 
> IMHO, whit should save empty nick there. Depends what you mean by
> removing nickname. Setting it to JID, setting it to node part of JID,
> setting it to something the user has set in vcard?

According to the schema the "name" attribute is optional.  So at some
point I've assigned a name for this person, but now I want to deassign
it (and NOT set it to something else).

-Mark



More information about the JDev mailing list