Commit 47088f1d authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Presence subscription is now of type both when each shared group can be seen...

Presence subscription is now of type both when each shared group can be seen by a group where the other user belongs. JM-985

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7194 b35dd754-fafc-0310-a699-88a17e54d16e
parent 665dc693
...@@ -885,20 +885,20 @@ public class RosterManager extends BasicModule implements GroupEventListener, Us ...@@ -885,20 +885,20 @@ public class RosterManager extends BasicModule implements GroupEventListener, Us
otherGroupNames.contains(group.getName())) { otherGroupNames.contains(group.getName())) {
return true; return true;
} }
// Check if both shared groups have a common group that can see both shared groups and // Check if each shared group can be seen by a group where each user belongs
// the users belong to such group
Collection<Group> groupList = parseGroups(groupNames); Collection<Group> groupList = parseGroups(groupNames);
Collection<Group> otherGroupList = parseGroups(otherGroupNames); Collection<Group> otherGroupList = parseGroups(otherGroupNames);
for (Group groupName : groupList) { for (Group groupName : groupList) {
if (groupName.isUser(otherUser)) {
for (Group otherGroupName : otherGroupList) { for (Group otherGroupName : otherGroupList) {
if (groupName.equals(otherGroupName) && groupName.isUser(user) && if (otherGroupName.isUser(user)) {
otherGroupName.isUser(otherUser)) {
return true; return true;
} }
} }
} }
} }
} }
}
else if ("everybody".equals(showInRoster) && "onlyGroup".equals(otherShowInRoster)) { else if ("everybody".equals(showInRoster) && "onlyGroup".equals(otherShowInRoster)) {
// Return true if one group is public and the other group allowed the public // Return true if one group is public and the other group allowed the public
// group to see him // group to see him
......
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