diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-10-23 19:09:54 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-10-23 19:09:54 (GMT) |
commit | 5dcea6769d7ad61282edbf19481cd25b676383f6 (patch) | |
tree | 6b73743b2451429318854b09786ebc28ffb9a4fb /Swift | |
parent | 8f19138b9543983a3292d6de9659674709e26d00 (diff) | |
download | swift-contrib-5dcea6769d7ad61282edbf19481cd25b676383f6.zip swift-contrib-5dcea6769d7ad61282edbf19481cd25b676383f6.tar.bz2 |
Make sure presence isn't type error before updating roster.
Resolves: #622
Release-Notes: Errors received from your contacts when setting your status will no longer cause the contacts to mirror your new status.
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/Controllers/RosterController.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp index 580e12b..9e50f0e 100644 --- a/Swift/Controllers/RosterController.cpp +++ b/Swift/Controllers/RosterController.cpp @@ -231,8 +231,11 @@ void RosterController::handleRosterSetError(boost::optional<ErrorPayload> error, eventController_->handleIncomingEvent(errorEvent); } -void RosterController::handleIncomingPresence(boost::shared_ptr<Presence> newPresence) { - boost::shared_ptr<Presence> appliedPresence(newPresence); +void RosterController::handleIncomingPresence(Presence::ref newPresence) { + if (newPresence->getType() == Presence::Error) { + return; + } + Presence::ref appliedPresence(newPresence); if (newPresence->getType() == Presence::Unsubscribe) { /* In 3921bis, subscription removal isn't followed by a presence push of unavailable*/ appliedPresence = boost::shared_ptr<Presence>(new Presence()); |