summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-03-05 08:11:24 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-03-05 08:11:24 (GMT)
commit32ff425c455a489adf7f5fa3ac876b63cbd0796b (patch)
treec8b6058311cdf8f7a0193f2de02088b365c5c5cb
parent7e4e32a06effd8c7164e0a3d241bdd834d51e4a0 (diff)
downloadswift-contrib-32ff425c455a489adf7f5fa3ac876b63cbd0796b.zip
swift-contrib-32ff425c455a489adf7f5fa3ac876b63cbd0796b.tar.bz2
Save password when bookmarking rooms.
Resolves: #1066
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index aedee4c..118f1e8 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -554,18 +554,21 @@ void ChatsManager::handleJoinMUCRequest(const JID &mucJID, const boost::optional
/* This is potentially not the optimal solution, but it will avoid consistency issues.*/
return;
}
if (addAutoJoin) {
MUCBookmark bookmark(mucJID, mucJID.getNode());
bookmark.setAutojoin(true);
if (nickMaybe) {
bookmark.setNick(*nickMaybe);
}
+ if (password) {
+ bookmark.setPassword(*password);
+ }
mucBookmarkManager_->addBookmark(bookmark);
}
std::map<JID, MUCController*>::iterator it = mucControllers_.find(mucJID);
if (it != mucControllers_.end()) {
it->second->rejoin();
} else {
std::string nick = (nickMaybe && !(*nickMaybe).empty()) ? nickMaybe.get() : nickResolver_->jidToNick(jid_);
MUC::ref muc = mucManager->createMUC(mucJID);