From ee7c3abcc960f5d4fd8686f3f3478c6f77e39b82 Mon Sep 17 00:00:00 2001 From: Philipp Andreas Date: Tue, 22 Jul 2014 19:49:49 +0200 Subject: Don't push empty email notifications to pebble --- daemon/notificationmanager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'daemon/notificationmanager.cpp') 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(), -- cgit v1.2.3