summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCătălin Badea <catalin.badea392@gmail.com>2012-08-11 20:11:36 (GMT)
committerCătălin Badea <catalin.badea392@gmail.com>2012-08-11 20:11:36 (GMT)
commitee93f90f636e2f646880489f2aeea2f61c508268 (patch)
treea9e132c34c07e4a8c611a81ee4a65a0575128570
parent623ebbd00fe3b9d33c4cc86b3c47bcea125d8de3 (diff)
downloadswift-contrib-ee93f90f636e2f646880489f2aeea2f61c508268.zip
swift-contrib-ee93f90f636e2f646880489f2aeea2f61c508268.tar.bz2
Fix displaying room contacts' nicks.
-rw-r--r--Swift/Controllers/HistoryViewController.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Swift/Controllers/HistoryViewController.cpp b/Swift/Controllers/HistoryViewController.cpp
index de63e74..21eb9eb 100644
--- a/Swift/Controllers/HistoryViewController.cpp
+++ b/Swift/Controllers/HistoryViewController.cpp
@@ -170,7 +170,14 @@ void HistoryViewController::handleReturnPressed(const std::string& keyword) {
for (ContactsMap::const_iterator contact = contacts_[type].begin(); contact != contacts_[type].end(); contact++) {
const JID& jid = contact->first;
- roster_->addContact(jid, jid, nickResolver_->jidToNick(jid), category[type], avatarManager_->getAvatarPath(jid).string());
+ std::string nick;
+ if (type == HistoryMessage::PrivateMessage) {
+ nick = jid.toString();
+ }
+ else {
+ nick = nickResolver_->jidToNick(jid);
+ }
+ roster_->addContact(jid, jid, nick, category[type], avatarManager_->getAvatarPath(jid).string());
Presence::ref presence = presenceOracle_->getHighestPriorityPresence(jid);