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,15 +885,15 @@ public class RosterManager extends BasicModule implements GroupEventListener, Us
otherGroupNames.contains(group.getName())) {
return true;
}
// Check if both shared groups have a common group that can see both shared groups and
// the users belong to such group
// Check if each shared group can be seen by a group where each user belongs
Collection<Group> groupList = parseGroups(groupNames);
Collection<Group> otherGroupList = parseGroups(otherGroupNames);
for (Group groupName : groupList) {
for (Group otherGroupName : otherGroupList) {
if (groupName.equals(otherGroupName) && groupName.isUser(user) &&
otherGroupName.isUser(otherUser)) {
return true;
if (groupName.isUser(otherUser)) {
for (Group otherGroupName : otherGroupList) {
if (otherGroupName.isUser(user)) {
return true;
}
}
}
}
......
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