private void updateIsIDEtalkClient(String jabberId, User user) { if (getResource(jabberId) .toLowerCase() .startsWith(JabberFacade.IDETALK_RESOURCE.toLowerCase())) { myIDEtalkUsers.add(user.getName()); } else { myIDEtalkUsers.remove(user.getName()); } }
private void updateJabberUsers(boolean removeUsersNotInRoster) { LOG.debug("Roster changed - update user model"); Set<User> currentUsers = new HashSet<>(Arrays.asList(myUserModel.getAllUsers())); for (RosterEntry rosterEntry : getRoster().getEntries()) { User user = addJabberUserToUserModelOrUpdateInfo(rosterEntry); currentUsers.remove(user); } if (removeUsersNotInRoster) { removeUsers(currentUsers); } if (LOG.isDebugEnabled()) { LOG.debug("Roster synchronized: " + Arrays.asList(myUserModel.getAllUsers())); } }