Commit 1cea0931 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Do not send presence of group members of non-shared groups that can see shared groups. JM-745

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4217 b35dd754-fafc-0310-a699-88a17e54d16e
parent 189d83f6
......@@ -750,17 +750,16 @@ public class RosterManager extends BasicModule implements GroupEventListener {
Collection<JID> users = new HashSet<JID>(group.getMembers());
users.addAll(group.getAdmins());
// If the user of the roster belongs to the shared group then we should return
// users that need to be in the roster with subscription "from"
if (group.isUser(roster.getUsername())) {
// Check if anyone can see this shared group
if ("everybody".equals(showInRoster)) {
// If the user of the roster belongs to the public group then we should return all users
// in the system since they all need to be in the roster with subscription "from"
if (group.isUser(roster.getUsername())) {
// Add all users in the system
for (String username : UserManager.getInstance().getUsernames()) {
users.add(server.createJID(username, null));
}
}
}
else {
// Add the users that may see the group
Collection<Group> groupList = parseGroups(groupNames);
......@@ -769,6 +768,7 @@ public class RosterManager extends BasicModule implements GroupEventListener {
users.addAll(groupInList.getAdmins());
}
}
}
return users;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment