summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-04-26 16:52:12 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-26 16:52:12 (GMT)
commitbc08209eedf8a8a9f2506420384201e2bd0035d4 (patch)
treeeafae0f103389d6e1f1511dfe363b39395a2e4f2 /Swift/Controllers/Chat/MUCController.cpp
parent4a1f206b0f8d4926b3a61cc8d7aad217761e52f6 (diff)
downloadswift-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.cpp10
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();