Mimicking what the admin console does, I can create props for a group:
group.getProperties().put(“sharedRoster.showInRoster”, “onlyGroup”);
group.getProperties().put(“sharedRoster.displayName”, “desc”);
group.getProperties().put(“sharedRoster.groupList”, “”);
but the groups never show in the members’’ rosters in their clients.
So I do it in the api:
User user = userManager.getUser(userID);
Roster userRoster = user.getRoster();
RosterItem item = userRoster.createRosterItem(server.createJID(group, null));
item.setSubStatus(RosterItem.SUB_BOTH);
and they can see the members of the other groups in their rosters. However, there are then other entries in their rosters:
“offline group groupName@server”
Is there any way to control how a group is displayed in a roster? Can I get rid of the “offline group” entry in the roster?
thanks,
Alistair