Commit 24a98355 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Adding/removing group members of a non-shared group was not correctly updating...

Adding/removing group members of a non-shared group was not correctly updating shared contacts rosters. JM-750

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4230 b35dd754-fafc-0310-a699-88a17e54d16e
parent e9516467
...@@ -93,9 +93,6 @@ public class RosterManager extends BasicModule implements GroupEventListener { ...@@ -93,9 +93,6 @@ public class RosterManager extends BasicModule implements GroupEventListener {
} }
} }
} }
if (roster == null) {
throw new UserNotFoundException(username);
}
return roster; return roster;
} }
...@@ -271,7 +268,6 @@ public class RosterManager extends BasicModule implements GroupEventListener { ...@@ -271,7 +268,6 @@ public class RosterManager extends BasicModule implements GroupEventListener {
// Simulate that the group users has been added to the group. This will cause to push // Simulate that the group users has been added to the group. This will cause to push
// roster items to the "affected" users for the group users // roster items to the "affected" users for the group users
//Collection<Group> visibleGroups = getVisibleGroups(group);
for (JID user : users) { for (JID user : users) {
groupUserAdded(group, user); groupUserAdded(group, user);
} }
...@@ -295,7 +291,6 @@ public class RosterManager extends BasicModule implements GroupEventListener { ...@@ -295,7 +291,6 @@ public class RosterManager extends BasicModule implements GroupEventListener {
// Simulate that the group users has been added to the group. This will cause to push // Simulate that the group users has been added to the group. This will cause to push
// roster items to the "affected" users for the group users // roster items to the "affected" users for the group users
//Collection<Group> visibleGroups = getVisibleGroups(group);
for (JID user : users) { for (JID user : users) {
groupUserAdded(group, user); groupUserAdded(group, user);
} }
...@@ -401,8 +396,8 @@ public class RosterManager extends BasicModule implements GroupEventListener { ...@@ -401,8 +396,8 @@ public class RosterManager extends BasicModule implements GroupEventListener {
if (!isSharedGroup(group)) { if (!isSharedGroup(group)) {
for (Group visibleGroup : getVisibleGroups(group)) { for (Group visibleGroup : getVisibleGroups(group)) {
// Get the list of affected users // Get the list of affected users
Collection<JID> users = new HashSet<JID>(group.getMembers()); Collection<JID> users = new HashSet<JID>(visibleGroup.getMembers());
users.addAll(group.getAdmins()); users.addAll(visibleGroup.getAdmins());
groupUserAdded(visibleGroup, users, addedUser); groupUserAdded(visibleGroup, users, addedUser);
} }
} }
...@@ -424,8 +419,8 @@ public class RosterManager extends BasicModule implements GroupEventListener { ...@@ -424,8 +419,8 @@ public class RosterManager extends BasicModule implements GroupEventListener {
if (!isSharedGroup(group)) { if (!isSharedGroup(group)) {
for (Group visibleGroup : getVisibleGroups(group)) { for (Group visibleGroup : getVisibleGroups(group)) {
// Get the list of affected users // Get the list of affected users
Collection<JID> users = new HashSet<JID>(group.getMembers()); Collection<JID> users = new HashSet<JID>(visibleGroup.getMembers());
users.addAll(group.getAdmins()); users.addAll(visibleGroup.getAdmins());
groupUserDeleted(visibleGroup, users, deletedUser); groupUserDeleted(visibleGroup, users, deletedUser);
} }
} }
...@@ -443,8 +438,8 @@ public class RosterManager extends BasicModule implements GroupEventListener { ...@@ -443,8 +438,8 @@ public class RosterManager extends BasicModule implements GroupEventListener {
if (!isSharedGroup(group)) { if (!isSharedGroup(group)) {
for (Group visibleGroup : getVisibleGroups(group)) { for (Group visibleGroup : getVisibleGroups(group)) {
// Get the list of affected users // Get the list of affected users
Collection<JID> users = new HashSet<JID>(group.getMembers()); Collection<JID> users = new HashSet<JID>(visibleGroup.getMembers());
users.addAll(group.getAdmins()); users.addAll(visibleGroup.getAdmins());
groupUserAdded(visibleGroup, users, addedUser); groupUserAdded(visibleGroup, users, addedUser);
} }
} }
...@@ -463,8 +458,8 @@ public class RosterManager extends BasicModule implements GroupEventListener { ...@@ -463,8 +458,8 @@ public class RosterManager extends BasicModule implements GroupEventListener {
if (!isSharedGroup(group)) { if (!isSharedGroup(group)) {
for (Group visibleGroup : getVisibleGroups(group)) { for (Group visibleGroup : getVisibleGroups(group)) {
// Get the list of affected users // Get the list of affected users
Collection<JID> users = new HashSet<JID>(group.getMembers()); Collection<JID> users = new HashSet<JID>(visibleGroup.getMembers());
users.addAll(group.getAdmins()); users.addAll(visibleGroup.getAdmins());
groupUserDeleted(visibleGroup, users, deletedUser); groupUserDeleted(visibleGroup, users, deletedUser);
} }
} }
......
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