diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-09 19:44:46 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-07-09 19:44:46 (GMT) |
commit | 9d0b490523df69c4c846b934c240dcea39df49aa (patch) | |
tree | 8344e1b2b8fc85bf3035e65d4c6707fdd812f64c /Swift/Controllers/Chat | |
parent | 120fc58d759630824d2e4107bf3c4f5a822999f5 (diff) | |
download | swift-contrib-9d0b490523df69c4c846b934c240dcea39df49aa.zip swift-contrib-9d0b490523df69c4c846b934c240dcea39df49aa.tar.bz2 |
Don't store the full JID for new ChatList entries
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/ChatsManager.cpp | 8 |
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); } } |