Commit 7e6c6cb5 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Do not send IQ of shared groups with subscription FROM. JM-179


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1039 b35dd754-fafc-0310-a699-88a17e54d16e
parent 699b7804
......@@ -366,6 +366,10 @@ public class Roster implements Cacheable {
// Add the roster items (includes the personal roster and shared groups) to the answer
for (RosterItem item : rosterItems.values()) {
// Do not include items with status FROM that exist only because of shared groups
if (item.isOnlyShared() && item.getSubStatus() == RosterItem.SUB_FROM) {
continue;
}
org.xmpp.packet.Roster.Ask ask = getAskStatus(item.getAskStatus());
org.xmpp.packet.Roster.Subscription sub = org.xmpp.packet.Roster.Subscription.valueOf(item.getSubStatus()
.getName());
......@@ -473,6 +477,10 @@ public class Roster implements Cacheable {
}
void broadcast(RosterItem item) {
// Do not broadcast items with status FROM that exist only because of shared groups
if (item.isOnlyShared() && item.getSubStatus() == RosterItem.SUB_FROM) {
return;
}
// Set the groups to broadcast (include personal and shared groups)
List<String> groups = new ArrayList<String>(item.getGroups());
for (Group sharedGroup : item.getSharedGroups()) {
......
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