From d0c2985c34b65f0d85d35948bb0cfadd3b2af7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Thu, 21 Oct 2010 21:59:57 +0200 Subject: Don't show popups for message bounches. Resolves: #647 Release-Notes: We no longer trigger popup notifications when a message bounches. diff --git a/Swift/Controllers/EventNotifier.cpp b/Swift/Controllers/EventNotifier.cpp index 2db11c6..605c13b 100644 --- a/Swift/Controllers/EventNotifier.cpp +++ b/Swift/Controllers/EventNotifier.cpp @@ -32,7 +32,9 @@ void EventNotifier::handleEventAdded(boost::shared_ptr event) { if (boost::shared_ptr messageEvent = boost::dynamic_pointer_cast(event)) { JID jid = messageEvent->getStanza()->getFrom(); String title = nickResolver->jidToNick(jid); - notifier->showMessage(Notifier::IncomingMessage, title, messageEvent->getStanza()->getBody(), avatarManager->getAvatarPath(jid), boost::bind(&EventNotifier::handleNotificationActivated, this, jid)); + if (!messageEvent->getStanza()->isError() && !messageEvent->getStanza()->getBody().isEmpty()) { + notifier->showMessage(Notifier::IncomingMessage, title, messageEvent->getStanza()->getBody(), avatarManager->getAvatarPath(jid), boost::bind(&EventNotifier::handleNotificationActivated, this, jid)); + } } else if(boost::shared_ptr subscriptionEvent = boost::dynamic_pointer_cast(event)) { JID jid = subscriptionEvent->getJID(); -- cgit v0.10.2-6-g49f6