diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-06-12 09:12:09 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-06-12 09:12:09 (GMT) |
commit | a5928fb2a77e4ba899ecd67aeb2412b70945058c (patch) | |
tree | 10bfd3db7a67338f1a298b17511b729a9f0a3db9 /Swift/Controllers/Chat/ChatController.cpp | |
parent | 81fe3113234c0610ce49de0299f43ae12d985a14 (diff) | |
download | swift-contrib-a5928fb2a77e4ba899ecd67aeb2412b70945058c.zip swift-contrib-a5928fb2a77e4ba899ecd67aeb2412b70945058c.tar.bz2 |
Don't re-associate a MUC PM with the bare JID when the target goes offline.
Resolves: #458
Diffstat (limited to 'Swift/Controllers/Chat/ChatController.cpp')
-rw-r--r-- | Swift/Controllers/Chat/ChatController.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp index 7b52fba..79221c4 100644 --- a/Swift/Controllers/Chat/ChatController.cpp +++ b/Swift/Controllers/Chat/ChatController.cpp @@ -97,9 +97,10 @@ String ChatController::getStatusChangeString(boost::shared_ptr<Presence> presenc } void ChatController::handlePresenceChange(boost::shared_ptr<Presence> newPresence, boost::shared_ptr<Presence> previousPresence) { - if (!(toJID_.isBare() && newPresence->getFrom().equals(toJID_, JID::WithoutResource)) && newPresence->getFrom() != toJID_) { + if (!toJID_.equals(newPresence->getFrom(), toJID_.isBare() ? JID::WithoutResource : JID::WithResource)) { return; } + chatStateTracker_->handlePresenceChange(newPresence, previousPresence); String newStatusChangeString = getStatusChangeString(newPresence); if (!previousPresence || newStatusChangeString != getStatusChangeString(previousPresence)) { |