Show group in group members rosters - API

I’'ve managed to do a REST plugin that creates and populates server groups based on information in a student record system:

group.getMembers().add(server.createJID(bean.getUserID(), null));

I then add each group that the user is a member of, to the user’'s roster but they always show as offline in the client:

User user = userManager.getUser(userID);

Roster userRoster = user.getRoster();

RosterItem item = userRoster.createRosterItem(server.createJID(group, null));

item.setSubStatus(RosterItem.SUB_BOTH);

item.addSharedGroup(groupObj);

When I go to the admin interface and enable “Show group in group members rosters”, the groups in the client become useable.

Is there any way to force “Show group in group members rosters” through the wildfire API?

thanks,

Alistair

Alistair,

I believe we have shared groups working through group properties at the moment. Check out the getPropery/setProperty methods. You should be able to figure out the syntax quite easily by looking at the values set by the admin console.

Regards,

Matt

Thanks Matt, I had an idea it might be to do with the properties but the Group object only has getProperties(). Am I overlooking an object with setProperties()?

thanks again,

Alistair

doh! I should stop spoon feeding

src/web/group-edit.jsp

group.getProperties().put(“sharedRoster.showInRoster” …

etc.

problem solved!

thanks for the pointer,

Alistair

… but it is broken and it’‘s not working :-(. I mean - it is working after a server resart, e.g. it serves for nothing if you’'re using a custom auth/user/group provider.

Message was edited by: joro_abv