I’'m using the following code to add existing users to new groups (assume no errors for this illustration):
// send presence request
Problem is that addEntry is missing the following line in the “if (sendEntry)” block:
So the surrounding call would have to be modified to read:
Item item = RosterEntry.toRosterItem(entry);
Funny thing is that this seems to have been broken for ever by looking at the SVN repository (at least for 2 years). However, now I see that Roster.createEntry (which I use to create new user entries) already does the same thing; so I might as well just change the logic a bit and just use that.
Is there a reason for having duplicated means to achieve the same result?