summaryrefslogtreecommitdiff
path: root/daemon/notificationmanager.cpp
diff options
context:
space:
mode:
authorPhilipp Andreas <github@smurfy.de>2014-07-22 19:49:49 +0200
committerPhilipp Andreas <github@smurfy.de>2014-07-22 19:49:49 +0200
commitee7c3abcc960f5d4fd8686f3f3478c6f77e39b82 (patch)
treef783edd70f4369be7f2dea6e891939a40818656b /daemon/notificationmanager.cpp
parentc2c141ed1e13e6f0fbc740d0ff37caba0b2a7c08 (diff)
Don't push empty email notifications to pebble
Diffstat (limited to 'daemon/notificationmanager.cpp')
-rw-r--r--daemon/notificationmanager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/daemon/notificationmanager.cpp b/daemon/notificationmanager.cpp
index 17e98bc..b758df2 100644
--- a/daemon/notificationmanager.cpp
+++ b/daemon/notificationmanager.cpp
@@ -120,10 +120,11 @@ void NotificationManager::Notify(const QString &app_name, uint replaces_id, cons
logger()->debug() << Q_FUNC_INFO << "Got notification via dbus from" << this->getCleanAppName(app_name);
if (app_name == "messageserver5") {
- emit this->emailNotify(hints.value("x-nemo-preview-summary", this->getCleanAppName(app_name)).toString(),
- hints.value("x-nemo-preview-body", "default").toString(),
- ""
- );
+ QString subject = hints.value("x-nemo-preview-summary", "").toString();
+ QString data = hints.value("x-nemo-preview-body", "").toString();
+ if (!data.isEmpty() && !subject.isEmpty()) {
+ emit this->emailNotify(subject, data, "");
+ }
} else if (app_name == "commhistoryd") {
if (summary == "" && body == "") {
emit this->smsNotify(hints.value("x-nemo-preview-summary", "default").toString(),