diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-04-26 16:52:12 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-04-26 16:52:12 (GMT) |
commit | bc08209eedf8a8a9f2506420384201e2bd0035d4 (patch) | |
tree | eafae0f103389d6e1f1511dfe363b39395a2e4f2 /Swift/Controllers/Chat/MUCController.cpp | |
parent | 4a1f206b0f8d4926b3a61cc8d7aad217761e52f6 (diff) | |
download | swift-bc08209eedf8a8a9f2506420384201e2bd0035d4.zip swift-bc08209eedf8a8a9f2506420384201e2bd0035d4.tar.bz2 |
Only include targeted messages in the Chats view count for MUCs.
Resolves: #935
Diffstat (limited to 'Swift/Controllers/Chat/MUCController.cpp')
-rw-r--r-- | Swift/Controllers/Chat/MUCController.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp index 775d7a2..3386877 100644 --- a/Swift/Controllers/Chat/MUCController.cpp +++ b/Swift/Controllers/Chat/MUCController.cpp @@ -393,10 +393,12 @@ void MUCController::preHandleIncomingMessage(boost::shared_ptr<MessageEvent> mes } clearPresenceQueue(); boost::shared_ptr<Message> message = messageEvent->getStanza(); - if (joined_ && messageEvent->getStanza()->getFrom().getResource() != nick_ && messageTargetsMe(message) && !message->getPayload<Delay>()) { - if (messageEvent->isReadable()) { - chatWindow_->flash(); - } + if (joined_ && messageEvent->getStanza()->getFrom().getResource() != nick_ && messageTargetsMe(message) && !message->getPayload<Delay>() && messageEvent->isReadable() +) { + chatWindow_->flash(); + } + else { + messageEvent->setTargetsMe(false); } if (joined_) { std::string nick = message->getFrom().getResource(); |