summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index 83a09d4..e648f20 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -200,7 +200,6 @@ void ChatsManager::handleBookmarksReady() {
void ChatsManager::handleMUCBookmarkAdded(const MUCBookmark& bookmark) {
std::map<JID, MUCController*>::iterator it = mucControllers_.find(bookmark.getRoom());
if (it == mucControllers_.end() && bookmark.getAutojoin()) {
- //FIXME: need vcard stuff here to get a nick
handleJoinMUCRequest(bookmark.getRoom(), bookmark.getPassword(), bookmark.getNick(), false, false);
}
chatListWindow_->addMUCBookmark(bookmark);
@@ -497,7 +496,7 @@ void ChatsManager::handleJoinMUCRequest(const JID &mucJID, const boost::optional
if (it != mucControllers_.end()) {
it->second->rejoin();
} else {
- std::string nick = nickMaybe ? nickMaybe.get() : jid_.getNode();
+ std::string nick = (nickMaybe && !(*nickMaybe).empty()) ? nickMaybe.get() : nickResolver_->jidToNick(jid_);
MUC::ref muc = mucManager->createMUC(mucJID);
if (createAsReservedIfNew) {
muc->setCreateAsReservedIfNew();