diff options
Diffstat (limited to 'Swift/Controllers/Roster/RosterController.cpp')
-rw-r--r-- | Swift/Controllers/Roster/RosterController.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp index 1c750a3..116ef2e 100644 --- a/Swift/Controllers/Roster/RosterController.cpp +++ b/Swift/Controllers/Roster/RosterController.cpp @@ -357,58 +357,56 @@ void RosterController::handleSubscriptionRequestAccepted(SubscriptionRequestEven subscriptionManager_->confirmSubscription(event->getJID()); if (!xmppRoster_->containsJID(event->getJID()) || xmppRoster_->getSubscriptionStateForJID(event->getJID()) == RosterItemPayload::None || xmppRoster_->getSubscriptionStateForJID(event->getJID()) == RosterItemPayload::From) { subscriptionManager_->requestSubscription(event->getJID()); } } void RosterController::handleSubscriptionRequestDeclined(SubscriptionRequestEvent* event) { subscriptionManager_->cancelSubscription(event->getJID()); } void RosterController::handleOwnVCardChanged(VCard::ref vcard) { ownContact_->setVCard(vcard); mainWindow_->setMyContactRosterItem(ownContact_); } void RosterController::handleAvatarChanged(const JID& jid) { boost::filesystem::path path = avatarManager_->getAvatarPath(jid); roster_->applyOnItems(SetAvatar(jid, path)); if (jid.equals(myJID_, JID::WithoutResource)) { mainWindow_->setMyAvatarPath(pathToString(path)); ownContact_->setAvatarPath(pathToString(path)); mainWindow_->setMyContactRosterItem(ownContact_); } } void RosterController::handlePresenceChanged(Presence::ref presence) { if (presence->getFrom().equals(myJID_, JID::WithResource)) { ownContact_->applyPresence(presence); mainWindow_->setMyContactRosterItem(ownContact_); } - else { - handleIncomingPresence(presence); - } + handleIncomingPresence(presence); } boost::optional<XMPPRosterItem> RosterController::getItem(const JID& jid) const { return xmppRoster_->getItem(jid); } std::set<std::string> RosterController::getGroups() const { return xmppRoster_->getGroups(); } void RosterController::handleOnCapsChanged(const JID& jid) { DiscoInfo::ref info = entityCapsManager_->getCaps(jid); if (info) { std::set<ContactRosterItem::Feature> features; if (FileTransferManager::isSupportedBy(info)) { features.insert(ContactRosterItem::FileTransferFeature); } if (info->hasFeature(DiscoInfo::WhiteboardFeature)) { features.insert(ContactRosterItem::WhiteboardFeature); } roster_->applyOnItems(SetAvailableFeatures(jid, features)); } } } |