/** * 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); } } }
broadcast(item, false);
org.xmpp.packet.Roster.Subscription.valueOf(item.getSubStatus().getName()), groups); broadcast(roster);
broadcast(item, true);
roster.broadcast(item, false);
broadcast(item, true);
broadcast(item, false);
broadcast(item, true);
roster.setType(IQ.Type.set); roster.addItem(user, org.xmpp.packet.Roster.Subscription.remove); broadcast(roster);
/** * 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); } } }
broadcast(item, false);
org.xmpp.packet.Roster.Subscription.valueOf(item.getSubStatus().getName()), groups); broadcast(roster);
roster.broadcast(item, false);
broadcast(item, false);
roster.setType(IQ.Type.set); roster.addItem(user, org.xmpp.packet.Roster.Subscription.remove); broadcast(roster);