summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-11-25 15:01:31 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-11-25 15:01:31 (GMT)
commit0a8486091b4cbcce1df883f4be1e65a4628c539b (patch)
tree9c31569d482b03bb95ebb270adce4e1dcd213356
parent7df402e9319b3ee2ce3c4d6e07a978f853b7a02e (diff)
downloadswift-contrib-0a8486091b4cbcce1df883f4be1e65a4628c539b.zip
swift-contrib-0a8486091b4cbcce1df883f4be1e65a4628c539b.tar.bz2
Deal with bookmarks with an empty nick
-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();