summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-07-09 19:00:30 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-07-09 19:00:30 (GMT)
commit3e154a0c3eae309acecdfe7524cfe1e1ca95386a (patch)
treef118f8cdb62494370d93ac743cde92a02360b586 /Swift/Controllers
parent26ac55fc087fb49abbdd164e125e41207e66f9fd (diff)
downloadswift-3e154a0c3eae309acecdfe7524cfe1e1ca95386a.zip
swift-3e154a0c3eae309acecdfe7524cfe1e1ca95386a.tar.bz2
Track when a user joins a MUC for the ChatList
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp1
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp1
-rw-r--r--Swift/Controllers/Chat/MUCController.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index 2d365a0..4c43a89 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -478,6 +478,7 @@ void ChatsManager::handleJoinMUCRequest(const JID &mucJID, const boost::optional
mucControllers_[mucJID] = controller;
controller->setAvailableServerFeatures(serverDiscoInfo_);
controller->onUserLeft.connect(boost::bind(&ChatsManager::handleUserLeftMUC, this, controller));
+ controller->onUserJoined.connect(boost::bind(&ChatsManager::handleChatActivity, this, mucJID.toBare(), "", true));
controller->onActivity.connect(boost::bind(&ChatsManager::handleChatActivity, this, mucJID.toBare(), _1, true));
controller->onUnreadCountChanged.connect(boost::bind(&ChatsManager::handleUnreadCountChanged, this, controller));
handleChatActivity(mucJID.toBare(), "", true);
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 2ac6109..93ceb13 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -185,6 +185,7 @@ void MUCController::handleJoinComplete(const std::string& nick) {
clearPresenceQueue();
shouldJoinOnReconnect_ = true;
setEnabled(true);
+ onUserJoined();
}
void MUCController::handleAvatarChanged(const JID& jid) {
diff --git a/Swift/Controllers/Chat/MUCController.h b/Swift/Controllers/Chat/MUCController.h
index b8972b1..c6901df 100644
--- a/Swift/Controllers/Chat/MUCController.h
+++ b/Swift/Controllers/Chat/MUCController.h
@@ -44,6 +44,7 @@ namespace Swift {
MUCController(const JID& self, MUC::ref muc, const std::string &nick, StanzaChannel* stanzaChannel, IQRouter* iqRouter, ChatWindowFactory* chatWindowFactory, PresenceOracle* presenceOracle, AvatarManager* avatarManager, UIEventStream* events, bool useDelayForLatency, TimerFactory* timerFactory, EventController* eventController);
~MUCController();
boost::signal<void ()> onUserLeft;
+ boost::signal<void ()> onUserJoined;
virtual void setOnline(bool online);
void rejoin();
static void appendToJoinParts(std::vector<NickJoinPart>& joinParts, const NickJoinPart& newEvent);