summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-07-09 19:44:46 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-07-09 19:44:46 (GMT)
commit9d0b490523df69c4c846b934c240dcea39df49aa (patch)
tree8344e1b2b8fc85bf3035e65d4c6707fdd812f64c /Swift/Controllers
parent120fc58d759630824d2e4107bf3c4f5a822999f5 (diff)
downloadswift-9d0b490523df69c4c846b934c240dcea39df49aa.zip
swift-9d0b490523df69c4c846b934c240dcea39df49aa.tar.bz2
Don't store the full JID for new ChatList entries
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index 12fec4f..5c0475d 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -211,11 +211,11 @@ ChatListWindow::Chat ChatsManager::createChatListChatItem(const JID& jid, const
if (controller) {
unreadCount = controller->getUnreadCount();
}
-
- Presence::ref presence = presenceOracle_->getHighestPriorityPresence(jid.toBare());
+ JID bareishJID = mucRegistry_->isMUC(jid.toBare()) ? jid : jid.toBare();
+ Presence::ref presence = presenceOracle_->getHighestPriorityPresence(bareishJID);
StatusShow::Type type = presence ? presence->getShow() : StatusShow::None;
- boost::filesystem::path avatarPath = avatarManager_ ? avatarManager_->getAvatarPath(jid) : boost::filesystem::path();
- return ChatListWindow::Chat(jid, nickResolver_->jidToNick(jid), activity, unreadCount, type, avatarPath, false);
+ boost::filesystem::path avatarPath = avatarManager_ ? avatarManager_->getAvatarPath(bareishJID) : boost::filesystem::path();
+ return ChatListWindow::Chat(bareishJID, nickResolver_->jidToNick(bareishJID), activity, unreadCount, type, avatarPath, false);
}
}