summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-11-05 22:05:15 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-11-05 22:06:16 (GMT)
commit3fbab3b40dfc31da46924f13984415b18087a8d4 (patch)
tree161e6a8f4479153120fc61548bd6407f260f347f /Swiften/Roster/XMPPRoster.cpp
parentff9b04252cbdd3bda5f1d01e1bad4a077f99791b (diff)
downloadswift-3fbab3b40dfc31da46924f13984415b18087a8d4.zip
swift-3fbab3b40dfc31da46924f13984415b18087a8d4.tar.bz2
A block of the work for roster pushes.
Still needs unit testing
Diffstat (limited to 'Swiften/Roster/XMPPRoster.cpp')
-rw-r--r--Swiften/Roster/XMPPRoster.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/Roster/XMPPRoster.cpp b/Swiften/Roster/XMPPRoster.cpp
index 9661171..a5cccaf 100644
--- a/Swiften/Roster/XMPPRoster.cpp
+++ b/Swiften/Roster/XMPPRoster.cpp
@@ -8,9 +8,12 @@ void XMPPRoster::addContact(const JID& jid, const String& name, const std::vecto
if (exists) {
entries_.erase(bareJID);
}
+ String oldName = getNameForJID(bareJID);
+ std::vector<String> oldGroups = entries_[bareJID].second;
entries_[bareJID] = std::pair<String, std::vector<String> >(name, groups);
if (exists) {
- onJIDUpdated(bareJID);
+
+ onJIDUpdated(bareJID, oldName, oldGroups);
} else {
onJIDAdded(bareJID);
}