1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-29 23:42:06 +01:00

SMACK-291: RosterGroup modifications should depend on roster push

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11634 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Günther Niess 2010-02-16 09:10:51 +00:00 committed by niess
parent f7614b494f
commit 0d9c25d475

View file

@ -157,6 +157,8 @@ public class RosterGroup {
/** /**
* Adds a roster entry to this group. If the entry was unfiled then it will be removed from * Adds a roster entry to this group. If the entry was unfiled then it will be removed from
* the unfiled list and will be added to this group. * the unfiled list and will be added to this group.
* Note that this is an asynchronous call -- Smack must wait for the server
* to receive the updated roster.
* *
* @param entry a roster entry. * @param entry a roster entry.
* @throws XMPPException if an error occured while trying to add the entry to the group. * @throws XMPPException if an error occured while trying to add the entry to the group.
@ -187,8 +189,6 @@ public class RosterGroup {
else if (response.getType() == IQ.Type.ERROR) { else if (response.getType() == IQ.Type.ERROR) {
throw new XMPPException(response.getError()); throw new XMPPException(response.getError());
} }
// Add the new entry to the group since the server processed the request successfully
addEntryLocal(entry);
} }
} }
@ -196,6 +196,8 @@ public class RosterGroup {
* Removes a roster entry from this group. If the entry does not belong to any other group * Removes a roster entry from this group. If the entry does not belong to any other group
* then it will be considered as unfiled, therefore it will be added to the list of unfiled * then it will be considered as unfiled, therefore it will be added to the list of unfiled
* entries. * entries.
* Note that this is an asynchronous call -- Smack must wait for the server
* to receive the updated roster.
* *
* @param entry a roster entry. * @param entry a roster entry.
* @throws XMPPException if an error occured while trying to remove the entry from the group. * @throws XMPPException if an error occured while trying to remove the entry from the group.
@ -229,8 +231,6 @@ public class RosterGroup {
else if (response.getType() == IQ.Type.ERROR) { else if (response.getType() == IQ.Type.ERROR) {
throw new XMPPException(response.getError()); throw new XMPPException(response.getError());
} }
// Remove the entry locally since the server processed the request successfully
removeEntryLocal(entry);
} }
} }