[JDEV] Two jabber:iq:roster questions
David Waite
dwaite at jabber.com
Wed Aug 15 22:27:54 CDT 2001
I haven't messed with any roster code in a while, but you may want to
try adding the entry as wanted (with their nickname and groups) with
subscription type='none', then sending the presence subscribe request.
-David Waite
Jens Alfke wrote:
> I'm trying to improve my roster support by storing the actual names in
> addition to the jids. I have two questions:
>
> (1) When adding a buddy, do I have to first send a <presence> element
> to subscribe, then a jabber:iq:roster "set" to add a name? I can't
> specify the real name in the <presence> element, and conversely, I
> don't think simply changing the 'subscription' mode in a roster
> element will actually cause a subscription attempt to occur, right?
> This seems sort of kludgy.
>
> (2) When sending a roster "set", can I just skip the fields I don't
> want to change? Ideally I'd just like to send:
> <iq type="set">
> <query xmlns="jabber:iq"roster">
> <item jid="snej at jabber.org"
> name="Jens Alfke"/>
> </query>
> </iq>
> but I'm afraid that omitting the 'group' and 'subscription' elements
> might clear their values.
>
> --Jens
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
More information about the JDev
mailing list