summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Roster/Roster.cpp')
-rw-r--r--Swiften/Roster/Roster.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Swiften/Roster/Roster.cpp b/Swiften/Roster/Roster.cpp
index b09964c..28245af 100644
--- a/Swiften/Roster/Roster.cpp
+++ b/Swiften/Roster/Roster.cpp
@@ -72,6 +72,18 @@ void Roster::removeContact(const JID& jid) {
}
}
+void Roster::removeContactFromGroup(const JID& jid, const String& groupName) {
+ std::vector<RosterItem*>::iterator it = children_.begin();
+ while (it != children_.end()) {
+ GroupRosterItem* group = dynamic_cast<GroupRosterItem*>(*it);
+ if (group && group->getName() == groupName) {
+ group->removeChild(jid);
+ }
+ it++;
+ }
+}
+
+
void Roster::applyOnItems(const RosterItemOperation& operation) {
std::deque<RosterItem*> queue(children_.begin(), children_.end());
while (!queue.empty()) {