diff options
Diffstat (limited to 'Swift/Controllers/Roster/Roster.cpp')
-rw-r--r-- | Swift/Controllers/Roster/Roster.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Swift/Controllers/Roster/Roster.cpp b/Swift/Controllers/Roster/Roster.cpp index f3d058e..83837b1 100644 --- a/Swift/Controllers/Roster/Roster.cpp +++ b/Swift/Controllers/Roster/Roster.cpp @@ -62,8 +62,11 @@ GroupRosterItem* Roster::getGroup(const std::string& groupName) { } void Roster::setAvailableFeatures(const JID& jid, const std::set<ContactRosterItem::Feature>& features) { - if (itemMap_[fullJIDMapping_ ? jid : jid.toBare()].empty()) return; - foreach(ContactRosterItem* item, itemMap_[fullJIDMapping_ ? jid : jid.toBare()]) { + JID actualJID = fullJIDMapping_ ? jid : jid.toBare(); + if (itemMap_[actualJID].empty()) { + return; + } + foreach(ContactRosterItem* item, itemMap_[actualJID]) { item->setSupportedFeatures(features); } } |