summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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();