summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-08-27 18:58:01 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-08-27 18:58:01 (GMT)
commitba774f85e77531c7971804cb738c6b434a197258 (patch)
treeeed0887a9494256b5271e14045cfb537737bcd00 /Swift/Controllers/RosterController.cpp
parentdd9e8b6bb212128c0e5c82a7cf80e2f49597bc31 (diff)
downloadswift-contrib-ba774f85e77531c7971804cb738c6b434a197258.zip
swift-contrib-ba774f85e77531c7971804cb738c6b434a197258.tar.bz2
Rerequest the roster at reconnect.
Resolves: #548
Diffstat (limited to 'Swift/Controllers/RosterController.cpp')
-rw-r--r--Swift/Controllers/RosterController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp
index 5ba00e4..87b0b74 100644
--- a/Swift/Controllers/RosterController.cpp
+++ b/Swift/Controllers/RosterController.cpp
@@ -49,6 +49,7 @@ RosterController::RosterController(const JID& jid, boost::shared_ptr<XMPPRoster>
xmppRoster_->onJIDAdded.connect(boost::bind(&RosterController::handleOnJIDAdded, this, _1));
xmppRoster_->onJIDUpdated.connect(boost::bind(&RosterController::handleOnJIDUpdated, this, _1, _2, _3));
xmppRoster_->onJIDRemoved.connect(boost::bind(&RosterController::handleOnJIDRemoved, this, _1));
+ xmppRoster_->onRosterCleared.connect(boost::bind(&RosterController::handleRosterCleared, this));
presenceOracle_->onPresenceSubscriptionRequest.connect(boost::bind(&RosterController::handleSubscriptionRequest, this, _1, _2));
presenceOracle_->onPresenceChange.connect(boost::bind(&RosterController::handleIncomingPresence, this, _1, _2));
uiEventConnection_ = uiEventStream->onUIEvent.connect(boost::bind(&RosterController::handleUIEvent, this, _1));
@@ -117,6 +118,10 @@ void RosterController::handleOnJIDAdded(const JID& jid) {
}
}
+void RosterController::handleRosterCleared() {
+ roster_->removeAll();
+}
+
void RosterController::handleOnJIDRemoved(const JID& jid) {
roster_->removeContact(jid);
}