JID userJID = getUserJID(); for (JID jid : users) {
/** * A shared group of the user has been renamed. Update the existing roster items with the new * name of the shared group and make a roster push for all the available resources. * * @param users group users of the renamed group. */ void shareGroupRenamed(Collection<JID> users) { JID userJID = getUserJID(); for (JID user : users) { if (userJID.equals(user)) { continue; } RosterItem item; try { // Get the RosterItem for the *local* user to add item = getRosterItem(user); // Broadcast to all the user resources of the updated roster item broadcast(item, true); } catch (UserNotFoundException e) { // Do nothing since the contact does not exist in the user's roster. (strange case!) Log.warn( "Unexpected error while broadcasting shared group rename for user '{}'!", user, e); } } }
GroupManager.getInstance().getGroups(getUserJID()); Collection<Group> sharedGroups = new ArrayList<>(); sharedGroups.addAll(item.getSharedGroups());
if (!rosterManager.isGroupVisible(group, getUserJID())) { GroupManager.getInstance().getGroups(getUserJID()); if (rosterManager.isGroupVisible(group, getUserJID())) { item.setSubStatus(RosterItem.SUB_TO);
Collection<Group> userGroups = GroupManager.getInstance().getGroups(getUserJID()); item.setSubStatus(RosterItem.SUB_BOTH); for (Group group : groups) { if (rosterManager.isGroupVisible(group, getUserJID())) { if (rosterManager.isGroupVisible(group, getUserJID())) {
Collection<Group> userGroups = GroupManager.getInstance().getGroups(getUserJID()); Collection<Group> sharedGroups = new ArrayList<>(); sharedGroups.addAll(item.getSharedGroups());
JID userJID = getUserJID(); for (JID jid : users) {
/** * A shared group of the user has been renamed. Update the existing roster items with the new * name of the shared group and make a roster push for all the available resources. * * @param users group users of the renamed group. */ void shareGroupRenamed(Collection<JID> users) { JID userJID = getUserJID(); for (JID user : users) { if (userJID.equals(user)) { continue; } RosterItem item; try { // Get the RosterItem for the *local* user to add item = getRosterItem(user); // Broadcast to all the user resources of the updated roster item broadcast(item, true); } catch (UserNotFoundException e) { // Do nothing since the contact does not exist in the user's roster. (strange case!) Log.warn( "Unexpected error while broadcasting shared group rename for user '{}'!", user, e); } } }
GroupManager.getInstance().getGroups(getUserJID()); Collection<Group> sharedGroups = new ArrayList<>(); sharedGroups.addAll(item.getSharedGroups());
if (!rosterManager.isGroupVisible(group, getUserJID())) { GroupManager.getInstance().getGroups(getUserJID()); if (rosterManager.isGroupVisible(group, getUserJID())) { item.setSubStatus(RosterItem.SUB_TO);
Collection<Group> userGroups = GroupManager.getInstance().getGroups(getUserJID()); item.setSubStatus(RosterItem.SUB_BOTH); for (Group group : groups) { if (rosterManager.isGroupVisible(group, getUserJID())) { if (rosterManager.isGroupVisible(group, getUserJID())) {
Collection<Group> userGroups = GroupManager.getInstance().getGroups(getUserJID()); Collection<Group> sharedGroups = new ArrayList<>(); sharedGroups.addAll(item.getSharedGroups());