powered by Jive Software

Assigning contacts to a group

Sometimes when calling Roster.createEntry( jabberId, “Alias”, new String[] { “Group” } ); on for a contact that is already in the Roster but in no group and that has no alias will only give the contact an Alias, but not move them to the “Group” group. They will simply be aliased to “Alias”, but remain in no Group. Here’‘s what the smack debug window says I’'m sending:

<iq id="6I4Od-5" type="set"><query xmlns="jabber:iq:roster"><item jid="itneyway%hotmail.com@msn.jabber.hawkesnest.net" name="whitney"><group>friends</group></item></query></iq>
<presence id="6I4Od-7" to="itneyway%hotmail.com@msn.jabber.hawkesnest.net" type="subscribe"></presence>
<iq id="6I4Od-8" type="set"><query xmlns="jabber:iq:roster"><item jid="itneyway%hotmail.com@msn.jabber.hawkesnest.net" name="whitney" subscription="both"></item></query></iq>
<iq id="6I4Od-9" type="get"><query xmlns="jabber:iq:roster"></query></iq>

And here’'s what I get back from the server:

<iq type=''set''><query xmlns=''jabber:iq:roster''>
<item jid=''itneyway%hotmail.com@msn.jabber.hawkesnest.net'' name=''whitney'' subscription=''both''><group>friends</group></item></query></iq><iq id=''6I4Od-5'' type=''result'' from=''synic@linuxhelp.homeunix.com/work'' to=''synic@linuxhelp.homeunix.com/work''/>
<iq type=''set''><query xmlns=''jabber:iq:roster''><item jid=''itneyway%hotmail.com@msn.jabber.hawkesnest.net'' name=''whitney'' subscription=''both''/></query></iq>
<iq id=''6I4Od-8'' type=''result'' from=''synic@linuxhelp.homeunix.com/work'' to=''synic@linuxhelp.homeunix.com/work''/><iq id=''6I4Od-9'' type=''result'' from=''synic@linuxhelp.homeunix.com/work''><query xmlns=''jabber:iq:roster''>

Any ideas?