summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/ChatsManager.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Swift/Controllers/ChatsManager.cpp b/Swift/Controllers/ChatsManager.cpp
index e64967c..a805802 100644
--- a/Swift/Controllers/ChatsManager.cpp
+++ b/Swift/Controllers/ChatsManager.cpp
@@ -120,8 +120,14 @@ void ChatsManager::rebindControllerJID(const JID& from, const JID& to) {
}
void ChatsManager::handleJoinMUCRequest(const JID &muc, const String &nick) {
- mucControllers_[muc] = new MUCController(jid_, muc, nick, stanzaChannel_, presenceSender_, iqRouter_, chatWindowFactory_, treeWidgetFactory_, presenceOracle_, avatarManager_);
- mucControllers_[muc]->setAvailableServerFeatures(serverDiscoInfo_);
+ std::map<JID, MUCController*>::iterator it = mucControllers_.find(muc);
+ if (it != mucControllers_.end()) {
+ //FIXME: What's correct behaviour here?
+ } else {
+ mucControllers_[muc] = new MUCController(jid_, muc, nick, stanzaChannel_, presenceSender_, iqRouter_, chatWindowFactory_, treeWidgetFactory_, presenceOracle_, avatarManager_);
+ mucControllers_[muc]->setAvailableServerFeatures(serverDiscoInfo_);
+ }
+ mucControllers_[muc]->activateChatWindow();
}
void ChatsManager::handleIncomingMessage(boost::shared_ptr<Message> message) {