diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-21 19:59:57 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-10-21 20:03:38 (GMT) |
commit | d0c2985c34b65f0d85d35948bb0cfadd3b2af7bd (patch) | |
tree | 598cd4f9a2468b6c0b3549a3ca3fbdf92ca6f456 /Swift/Controllers | |
parent | 0584f46831ef86dc91a5ac1011636559e129b878 (diff) | |
download | swift-contrib-d0c2985c34b65f0d85d35948bb0cfadd3b2af7bd.zip swift-contrib-d0c2985c34b65f0d85d35948bb0cfadd3b2af7bd.tar.bz2 |
Don't show popups for message bounches.
Resolves: #647
Release-Notes: We no longer trigger popup notifications when a message
bounches.
Diffstat (limited to 'Swift/Controllers')
-rw-r--r-- | Swift/Controllers/EventNotifier.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<StanzaEvent> event) { if (boost::shared_ptr<MessageEvent> messageEvent = boost::dynamic_pointer_cast<MessageEvent>(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<SubscriptionRequestEvent> subscriptionEvent = boost::dynamic_pointer_cast<SubscriptionRequestEvent>(event)) { JID jid = subscriptionEvent->getJID(); |