summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-01-26 15:04:00 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-02-01 11:02:25 (GMT)
commit1db3724bd248d98e877f0be1485ef54b3ce503a7 (patch)
tree60dc0fc6f3b362ddd1b3f14ea47a48d70e1b9ec5
parent45828058f4a5e235e9caa9861027f3a9e1682fae (diff)
downloadswift-1db3724bd248d98e877f0be1485ef54b3ce503a7.zip
swift-1db3724bd248d98e877f0be1485ef54b3ce503a7.tar.bz2
Fix MUC nickname change error in ChatController
ChatControllers used to wrongly lookup the nickname of a MUC PM contact using the bare room JID after a nickname change. With this change, the new full JID, i.e. with the new nickname as resource part, is used for nickname lookup. Test-Information: Tested with multiple PM chats open in a room. Both PM contacts changing their nicknames. Now only the corresponding chat tab changes its title. Before both used to change their title on a change of a single occupants nickname. ./scons test=system passes on OS X 10.11.3. Change-Id: I1c274498bcd96edd3370f73cb824fc81d726682c
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp
index e2751f7..eb86766 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -106,7 +106,7 @@ ChatController::ChatController(const JID& self, StanzaChannel* stanzaChannel, IQ
void ChatController::handleContactNickChanged(const JID& jid, const std::string& /*oldNick*/) {
if (jid.toBare() == toJID_.toBare()) {
- chatWindow_->setName(nickResolver_->jidToNick(jid));
+ chatWindow_->setName(nickResolver_->jidToNick(toJID_));
}
}