summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-06-23 16:23:29 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-06-23 16:23:29 (GMT)
commitc8a610d825985ca470fff46f1a2c43f6afe5080f (patch)
treec98ff7e7d5721f61de261d812625f9d1b996c883 /Swift
parentd1c7372f3d944ded9daf01a3ffa28da7d41fab24 (diff)
downloadswift-contrib-c8a610d825985ca470fff46f1a2c43f6afe5080f.zip
swift-contrib-c8a610d825985ca470fff46f1a2c43f6afe5080f.tar.bz2
Use a consistent fallback nickname when autojoining MUCs
Previously there was a race whereby initial bookmark autojoins would join with a JID-based nick, and subsequent joins (where no nick is specified) would use the user's VCard nick. Resolves: #1034
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/MainController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 53387ca..f124298 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -290,6 +290,11 @@ void MainController::handleConnected() {
contactEditController_ = new ContactEditController(rosterController_, client_->getVCardManager(), uiFactory_, uiEventStream_);
+ /* Doing this early as an ordering fix. Various things later will
+ * want to have the user's nick available and this means it will
+ * be before they receive stanzas that need it (e.g. bookmarks).*/
+ client_->getVCardManager()->requestOwnVCard();
+
chatsManager_ = new ChatsManager(jid_, client_->getStanzaChannel(), client_->getIQRouter(), eventController_, uiFactory_, uiFactory_, client_->getNickResolver(), client_->getPresenceOracle(), client_->getPresenceSender(), uiEventStream_, uiFactory_, useDelayForLatency_, networkFactories_->getTimerFactory(), client_->getMUCRegistry(), client_->getEntityCapsProvider(), client_->getMUCManager(), uiFactory_, profileSettings_, ftOverview_, client_->getRoster(), !settings_->getSetting(SettingConstants::REMEMBER_RECENT_CHATS), settings_);
client_->onMessageReceived.connect(boost::bind(&ChatsManager::handleIncomingMessage, chatsManager_, _1));