[JDEV] Two jabber:iq:roster questions

Jens Alfke jens at mac.com
Wed Aug 15 18:21:09 CDT 2001


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




More information about the JDev mailing list