Commit 9bcbd792 authored by Andrew den Exter's avatar Andrew den Exter

Merge branch 'jb51257' into 'upgrade-3.4.0'

[commhistoryd] Backport notification changes to 3.4.0. Contributes to JB#51257

See merge request !46
parents a472d3d1 6b0483ac
appIcon=icon-lock-missed-call
urgency=2
x-nemo-icon=icon-lock-missed-call
app_icon=icon-lock-missed-call
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-max-content-lines=1
x-nemo-feedback=call_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-missed-call
urgency=2
x-nemo-icon=icon-lock-missed-call
app_icon=icon-lock-missed-call
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-max-content-lines=1
x-nemo-feedback=call_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-sms
x-nemo-icon=icon-lock-invitation
x-nemo-preview-icon=icon-s-status-invitation-pending
app_icon=icon-s-status-invitation-pending
x-nemo-feedback=default
x-nemo-user-removable=false
x-nemo-priority=90
appIcon=icon-lock-information
urgency=2
app_icon=icon-lock-information
x-nemo-display-on=true
transient=true
appIcon=icon-lock-information
urgency=2
app_icon=icon-lock-information
x-nemo-display-on=true
transient=true
x-nemo-feedback=warning_strong
appIcon=icon-lock-sms
urgency=2
x-nemo-icon=icon-lock-sms
app_icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=sms_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-sms
app_icon=icon-lock-sms
transient=true
urgency=2
x-nemo-preview-icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=sms
x-nemo-display-on=true
appIcon=icon-lock-sms
urgency=2
x-nemo-icon=icon-lock-sms
app_icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-max-content-lines=6
x-nemo-feedback=chat_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-sms
app_icon=icon-lock-sms
transient=true
urgency=2
x-nemo-preview-icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=chat
x-nemo-display-on=true
appIcon=icon-lock-sms
urgency=2
x-nemo-icon=icon-lock-sms
app_icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-max-content-lines=6
x-nemo-feedback=sms_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-sms
app_icon=icon-lock-sms
transient=true
urgency=2
x-nemo-preview-icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=sms
x-nemo-display-on=true
appIcon=icon-lock-sms
urgency=2
x-nemo-icon=icon-lock-sms
app_icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-max-content-lines=6
x-nemo-feedback=sms_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-sms
app_icon=icon-lock-sms
transient=true
urgency=2
x-nemo-preview-icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=sms
x-nemo-display-on=true
appIcon=icon-lock-sms
urgency=2
x-nemo-icon=icon-lock-sms
app_icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=sms_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-sms
app_icon=icon-lock-sms
transient=true
urgency=2
x-nemo-preview-icon=icon-lock-sms
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=sms
x-nemo-display-on=true
appIcon=icon-lock-voicemail
x-nemo-icon=icon-lock-voicemail
x-nemo-preview-icon=icon-lock-voicemail
app_icon=icon-lock-voicemail
x-nemo-priority=120
x-nemo-max-content-lines=1
x-nemo-user-removable=false
x-nemo-feedback=sms,sms_exists
x-nemo-led-disabled-without-body-and-summary=false
x-nemo-display-on=true
appIcon=icon-lock-voicemail
urgency=2
x-nemo-icon=icon-lock-voicemail
app_icon=icon-lock-voicemail
x-nemo-display-on=true
x-nemo-user-removable=false
x-nemo-priority=120
x-nemo-max-content-lines=1
x-nemo-feedback=sms_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-voicemail
urgency=2
x-nemo-icon=icon-lock-voicemail
app_icon=icon-lock-voicemail
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-user-removable=false
x-nemo-max-content-lines=1
x-nemo-feedback=sms_exists
x-nemo-led-disabled-without-body-and-summary=false
appIcon=icon-lock-voicemail
app_icon=icon-lock-voicemail
transient=true
urgency=2
x-nemo-preview-icon=icon-lock-voicemail
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=sms
x-nemo-display-on=true
appIcon=icon-lock-voicemail
app_icon=icon-lock-voicemail
transient=true
urgency=2
x-nemo-preview-icon=icon-lock-voicemail
x-nemo-display-on=true
x-nemo-priority=120
x-nemo-feedback=sms
x-nemo-display-on=true
......@@ -11,7 +11,7 @@ BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: pkgconfig(Qt5Versit)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(commhistory-qt5) >= 1.9.33
BuildRequires: pkgconfig(commhistory-qt5) >= 1.10.1.1
BuildRequires: pkgconfig(contactcache-qt5)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions)
BuildRequires: pkgconfig(TelepathyQt5)
......@@ -20,16 +20,17 @@ BuildRequires: pkgconfig(mlocale5)
BuildRequires: pkgconfig(mce)
BuildRequires: pkgconfig(ngf-qt5)
BuildRequires: pkgconfig(qt5-boostable)
BuildRequires: pkgconfig(nemonotifications-qt5) >= 1.0.5
BuildRequires: pkgconfig(nemonotifications-qt5) > 1.2.1
BuildRequires: qt5-qttools
BuildRequires: qt5-qttools-linguist
BuildRequires: libqofono-qt5-devel >= 0.89
BuildRequires: libqofonoext-devel
BuildRequires: python3-base
BuildRequires: systemd
Requires: libcommhistory-qt5 >= 1.9.33
Requires: libcommhistory-qt5 >= 1.10.1.1
Requires: libqofono-qt5 >= 0.66
Requires: mapplauncherd-qt5
Requires: nemo-qml-plugin-notifications-qt5 >= 1.2.1.1
Obsoletes: smshistory <= 0.1.8
Provides: smshistory > 0.1.8
......
......@@ -24,10 +24,6 @@
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include <CommHistory/Event>
namespace RTComLogger {
// Used to generate duiremoteaction strings
#define OBJECT_PATH QLatin1String("/")
......@@ -55,10 +51,10 @@ namespace RTComLogger {
#define VOICEMAIL_METHOD QLatin1String("voicemail")
#define REPLACE_TYPE QLatin1String("sms-replace-number")
#define VOICEMAIL_WAITING_SERVICE QLatin1String("com.jolla.voicecall.ui")
#define VOICEMAIL_WAITING_OBJECT_PATH QLatin1String("/")
#define VOICEMAIL_WAITING_INTERFACE QLatin1String("com.jolla.voicecall.ui")
#define VOICEMAIL_WAITING_METHOD QLatin1String("openUrl")
#define VOICECALL_SERVICE QLatin1String("com.jolla.voicecall.ui")
#define VOICECALL_OBJECT_PATH QLatin1String("/")
#define VOICECALL_INTERFACE QLatin1String("com.jolla.voicecall.ui")
#define VOICECALL_DIAL_METHOD QLatin1String("dial")
// Custom hints for identifying notifications
#define ACCOUNT_PATH_HINT QLatin1String("x-org-nemomobile-qmlmessages.account.path")
......@@ -96,30 +92,4 @@ namespace RTComLogger {
#define VOICEMAIL_CONTACT_VMID_DIR QLatin1String("contacts")
#define VOICEMAIL_CONTACT_VMID_FILE QLatin1String("vmid")
// events
struct EventTypes {
int type;
const char* event;
};
static const EventTypes _eventTypes[] =
{
{CommHistory::Event::IMEvent, "x-nemo.messaging.im"},
{CommHistory::Event::SMSEvent, "x-nemo.messaging.sms"},
{CommHistory::Event::MMSEvent, "x-nemo.messaging.mms"},
{CommHistory::Event::CallEvent, "x-nemo.call.missed"},
{CommHistory::Event::VoicemailEvent,"x-nemo.messaging.voicemail"},
{VOICEMAIL_SMS_EVENT_TYPE, "x-nemo.messaging.voicemail-SMS"}
};
static const int _eventTypesCount = sizeof(_eventTypes) / sizeof(EventTypes);
// Custom system info notification types for commhistoryd:
const QString ErrorCategory = "x-nemo.messaging.error";
const QString StrongErrorCategory = "x-nemo.messaging.error.strong";
const QString voicemailWaitingCategory = "x-nemo.messaging.voicemail-waiting";
}
#endif //#define CONSTANTS_H
......@@ -61,10 +61,10 @@
#define txt_qtn_msg_contact_card_label qtTrId("qtn_msg_contact_card_label")
//% "%1 | %2"
#define txt_qtn_msg_notification_new_vcard(STR) qtTrId("qtn_msg_received_contact_card").arg(txt_qtn_msg_contact_card_label).arg(STR)
//% "Show Messages"
#define txt_qtn_msg_notification_show_messages qtTrId("txt_qtn_msg_notification_show_messages")
//% "Reply"
#define txt_qtn_msg_notification_reply qtTrId("qtn_msg_notification_reply")
//% "Call"
#define txt_qtn_msg_notification_call qtTrId("qtn_msg_notification_call")
//% "%n attachment(s)"
#define txt_qtn_mms_notification_attachment(NUM) qtTrId("qtn_mms_notification_attachment", NUM)
//% "%1 | %2"
......@@ -79,15 +79,15 @@
#define txt_qtn_call_type_private qtTrId("qtn_call_type_private")
//% "Voicemail"
#define txt_qtn_call_type_voicemail qtTrId("qtn_call_type_voicemail")
//% "Show call history"
#define txt_qtn_call_notification_show_call_history qtTrId("txt_qtn_call_notification_show_call_history")
//% "Call back"
#define txt_qtn_call_notification_call_back qtTrId("txt_qtn_call_notification_call_back")
//% "Send message"
#define txt_qtn_call_notification_send_message qtTrId("txt_qtn_call_notification_send_message")
//% "Tap to listen"
#define txt_qtn_voicemail_prompt qtTrId("qtn_voicemail_prompt")
//% "Call voicemail"
#define txt_qtn_voicemail_notification_call qtTrId("txt_qtn_voicemail_notification_call")
//% "Show voicemail"
#define txt_qtn_voicemail_notification_show_voicemail qtTrId("txt_qtn_voicemail_notification_show_voicemail")
//% "Multimedia message was delivered to %1"
#define txt_qtn_msg_notification_delivered(STR) qtTrId("qtn_mms_info_delivered").arg(STR)
......
This diff is collapsed.
/******************************************************************************
**
** This file is part of commhistory-daemon.
**
** Copyright (C) 2013 Jolla Ltd.
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** Contact: John Brooks <john.brooks@jolla.com>
**
** This library is free software; you can redistribute it and/or modify it
** under the terms of the GNU Lesser General Public License version 2.1 as
** published by the Free Software Foundation.
**
** This library is distributed in the hope that it will be useful, but
** WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
** or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
** License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with this library; if not, write to the Free Software Foundation, Inc.,
** 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
**
******************************************************************************/
#ifndef NOTIFICATIONGROUP_H
#define NOTIFICATIONGROUP_H
#include "personalnotification.h"
#include <QObject>
#include <QString>
#include <QMetaType>
#include <QTimer>
class Notification;
namespace CommHistory {
class Event;
}
namespace RTComLogger {
class NotificationGroup : public QObject
{
Q_OBJECT
public:
NotificationGroup(PersonalNotification::EventCollection collection, const QString &localUid, const QString &remoteUid, QObject *parent = 0);
virtual ~NotificationGroup();
static QString groupType(int eventType);
static int eventType(const QString &groupType);
static QString groupName(PersonalNotification::EventCollection collection);
static QString groupCategory(PersonalNotification::EventCollection collection);
PersonalNotification::EventCollection collection() const;
const QString &localUid() const;
const QString &remoteUid() const;
Notification *notification();
QList<PersonalNotification*> notifications() const;
/* Add a notification to this group
*
* Ownership and management of the notification are assumed. If marked as pending, the
* notification will be emitted automatically. Changes to the notification will be handled
* automatically. */
void addNotification(PersonalNotification *notification);
/* Remove a notification
*
* The notification will be unpublished and its instance deleted. The group may be empty
* afterwards, in which case it will also be unpublished. Caller should delete this instance
* when empty afterwards, if desired. */
bool removeNotification(PersonalNotification *&notification);
public slots:
/* Update the group's message text and publish it if necessary. Should not need to be called
* manually; the group will be updated after all relevant changes to notifications. */
void updateGroup();
void updateGroupLater();
/* Remove the group and all notifications. Equivalent to calling removeNotification for each
* notification. */
void removeGroup();
signals:
/* Emitted when the group or any notification within it has changed */
void changed();
private slots:
void onNotificationChanged();
void onNotificationClosed(PersonalNotification *);
void onClosed(uint);
private:
PersonalNotification::EventCollection m_collection;
QString m_localUid;
QString m_remoteUid;
Notification *mGroup;
QList<PersonalNotification*> mNotifications;
QTimer updateTimer;
friend class Ut_NotificationManager;
QStringList contactNames();
QString notificationGroupText();
int countConversations();
};
} // namespace
#endif // NOTIFICATIONGROUP_H
This diff is collapsed.
......@@ -46,7 +46,6 @@
// our includes
#include "commhistoryservice.h"
#include "notificationgroup.h"
#include "personalnotification.h"
namespace Ngf {
......@@ -68,20 +67,6 @@ class NotificationManager : public QObject
public:
typedef CommHistory::RecipientList RecipientList;
struct EventGroupProperties {
PersonalNotification::EventCollection collection;
CommHistory::Recipient recipient;
bool operator== (const EventGroupProperties &other) const { return (collection == other.collection && recipient.matches(other.recipient)); }
};
static EventGroupProperties eventGroup(PersonalNotification::EventCollection c, const CommHistory::Recipient &recipient) {
EventGroupProperties properties;
properties.collection = c;
properties.recipient = recipient;
return properties;
}
/*!
* \param QObject parent object
* \returns Notification manager singleton
......@@ -166,8 +151,6 @@ private:
void syncNotifications();
int pendingEventCount();
void clearPendingEvents(const NotificationGroup &group);
void removeNotPendingEvents(const NotificationGroup &group);
bool isFilteredInbox();
QString filteredInboxAccountPath();
......@@ -178,9 +161,9 @@ private:
private:
static NotificationManager* m_pInstance;
QHash<EventGroupProperties, NotificationGroup*> m_Groups;
bool m_Initialised;
QList<PersonalNotification*> m_notifications;
QList<PersonalNotification*> m_unresolvedNotifications;
CommHistory::ContactResolver *m_contactResolver;
......@@ -198,15 +181,6 @@ private:
#endif
};
inline uint qHash(const NotificationManager::EventGroupProperties &properties, uint seed)
{
using ::qHash;
// EventGroups are ultimately equivalent by the contacts they resolve to, so we should use
// contact ID as the hash differentiator. UID pairs that do not resolve to a contact will
// therefore all hash to the same value, which will be inefficient, but work correctly
return qHash(properties.collection, seed) ^ qHash(properties.recipient.contactId(), seed);
}
} // namespace RTComLogger
#endif // NOTIFICATIONMANAGER_H
......@@ -23,7 +23,6 @@
#include "personalnotification.h"
#include "notificationmanager.h"
#include "notificationgroup.h"
#include "locstrings.h"
#include "constants.h"
#include "debug.h"
......@@ -34,12 +33,54 @@
using namespace RTComLogger;
using namespace CommHistory;
// events
struct EventTypes {
int type;
const char* event;
};
static const EventTypes _eventTypes[] =
{
{CommHistory::Event::IMEvent, "x-nemo.messaging.im"},
{CommHistory::Event::SMSEvent, "x-nemo.messaging.sms"},
{CommHistory::Event::MMSEvent, "x-nemo.messaging.mms"},
{CommHistory::Event::CallEvent, "x-nemo.call.missed"},
{CommHistory::Event::VoicemailEvent,"x-nemo.messaging.voicemail"},
{VOICEMAIL_SMS_EVENT_TYPE, "x-nemo.messaging.voicemail-SMS"}
};
static const int _eventTypesCount = sizeof(_eventTypes) / sizeof(EventTypes);
static QString groupType(int eventType)
{
for (int i = 0; i < _eventTypesCount; i++) {
if (_eventTypes[i].type == eventType)
return QLatin1String(_eventTypes[i].event);
}
return QString();
}
static QString groupName(PersonalNotification::EventCollection collection)
{
switch (collection) {
case PersonalNotification::Voicemail:
return txt_qtn_msg_voicemail_group;
case PersonalNotification::Voice:
return txt_qtn_msg_missed_calls_group;
case PersonalNotification::Messaging:
return txt_qtn_msg_notifications_group;
}
return QString();
}
PersonalNotification::PersonalNotification(QObject* parent) : QObject(parent),
m_eventType(CommHistory::Event::UnknownType),
m_chatType(CommHistory::Group::ChatTypeP2P),
m_hasPendingEvents(false),
m_hidden(false),
m_restored(false),
m_notification(0)
{
}
......@@ -56,8 +97,6 @@ PersonalNotification::PersonalNotification(const QString& remoteUid,
m_eventType(eventType), m_targetId(channelTargetId), m_chatType(chatType),
m_notificationText(lastNotification),
m_hasPendingEvents(true),
m_hidden(false),
m_restored(false),
m_notification(0),
m_recipient(account, remoteUid)
{
......@@ -91,7 +130,6 @@ bool PersonalNotification::restore(Notification *n)
m_notification = n;
m_recipient = Recipient(account(), remoteUid());
m_restored = true;
connect(m_notification, SIGNAL(closed(uint)), SLOT(onClosed(uint)));
return true;
}
......@@ -122,38 +160,25 @@ void PersonalNotification::publishNotification()
m_notification->setTimestamp(QDateTime::currentDateTimeUtc());
}
m_notification->setAppName(NotificationGroup::groupName(collection()));
m_notification->setCategory(NotificationGroup::groupType(m_eventType));
m_notification->setAppName(groupName(collection()));
m_notification->setCategory(groupType(m_eventType));
m_notification->setHintValue("x-commhistoryd-data", serialized().toBase64());
m_notification->setHintValue("x-nemo-hidden", m_hidden);
m_notification->setSummary(name);
m_notification->setBody(notificationText());
m_notification->setIcon(m_recipient.contactAvatarUrl().toString());
NotificationManager::instance()->setNotificationProperties(m_notification, this, false);
// Show preview banner for notifications not previously reported
// (missed calls have no preview as the incoming call dialog was just shown)
if ((collection() != Voice) && !m_hidden && m_notification->replacesId() == 0) {
Notification preview;
preview.setAppName(m_notification->appName());
preview.setCategory(m_notification->category() + QStringLiteral(".preview"));
preview.setPreviewSummary(m_notification->summary());
preview.setPreviewBody(m_notification->body());
NotificationManager::instance()->setNotificationProperties(&preview, this, false);
preview.publish();
DEBUG() << preview.replacesId() << preview.category() << preview.previewSummary() << preview.previewBody();
if (collection() == Voice) {
m_notification->clearPreviewSummary();
m_notification->clearPreviewBody();
}
m_notification->publish();
setHasPendingEvents(false);
m_restored = false;
DEBUG() << m_notification->replacesId() << m_notification->category() << m_notification->summary() << m_notification->body() << m_notification->hintValue("x-nemo-hidden");
DEBUG() << m_notification->replacesId() << m_notification->category() << m_notification->summary() << m_notification->body();
}
void PersonalNotification::removeNotification()
......@@ -268,12 +293,21 @@ QDateTime PersonalNotification::timestamp() const
bool PersonalNotification::hidden() const
{
return m_hidden;
// Deprecated but still needed for serialization compatibilty.
return false;
}
bool PersonalNotification::restored() const
bool PersonalNotification::hasPhoneNumber() const
{
return m_restored;
switch (m_eventType) {
case CommHistory::Event::SMSEvent:
case CommHistory::Event::MMSEvent:
case CommHistory::Event::CallEvent:
case VOICEMAIL_SMS_EVENT_TYPE:
return CommHistory::normalizePhoneNumber(m_remoteUid, true).length() > 0;
default:
return false;
}
}
void PersonalNotification::setRemoteUid(const QString& remoteUid)
......@@ -356,12 +390,9 @@ void PersonalNotification::setSmsReplaceNumber(const QString &number)
}
}
void PersonalNotification::setHidden(bool hide)
void PersonalNotification::setHidden(bool)
{
if (m_hidden != hide) {
m_hidden = hide;
setHasPendingEvents(true);
}
// Deprecated but still needed for serialization compatibilty.
}
const Recipient &PersonalNotification::recipient() const
......@@ -389,11 +420,6 @@ QDataStream& operator>>(QDataStream &in, RTComLogger::PersonalNotification &key)
{
key.deSerialize(in, key);
// Hidden property is not in the serialization from earlier forms
if (!key.property("hidden").isValid()) {
key.setProperty("hidden", QVariant::fromValue(false));
}
return in;
}
......@@ -115,7 +115,8 @@ public:
QString smsReplaceNumber() const;
QDateTime timestamp() const;
bool hidden() const;
bool restored() const;
bool hasPhoneNumber() const;
void setRemoteUid(const QString& remoteUid);
void setAccount(const QString& account);
......
......@@ -57,7 +57,6 @@ HEADERS += logger.h \
loggerclientobserver.h \
notificationmanager.h \
serialisable.h \
notificationgroup.h \
personalnotification.h \
commhistoryifadaptor.h \
commhistoryservice.h \
......@@ -86,7 +85,6 @@ SOURCES += main.cpp \
loggerclientobserver.cpp \
notificationmanager.cpp \
serialisable.cpp \
notificationgroup.cpp \
personalnotification.cpp \
commhistoryifadaptor.cpp \
commhistoryservice.cpp \
......
......@@ -116,6 +116,8 @@ QTCONTACTS_USE_NAMESPACE
QTVERSIT_USE_NAMESPACE
namespace {
const QString ErrorCategory = "x-nemo.messaging.error";
const QString StrongErrorCategory = "x-nemo.messaging.error.strong";
CommHistory::Event::PropertySet deliveryHandlingProperties = CommHistory::Event::PropertySet()
<< CommHistory::Event::Id
......@@ -197,6 +199,18 @@ QString subscriberIdentity(const Tp::MessagePart &header)
return partValue<QString>(header, SUBSCRIBER_IDENTITY_HEADER_KEY);
}
void showErrorNote(const QString &errorMsg, const QString &category = ErrorCategory)
{
if (!errorMsg.isEmpty()) {
Notification notification;
notification.setAppName(txt_qtn_msg_errors_group);
notification.setCategory(category);
notification.setBody(errorMsg);
notification.setPreviewBody(errorMsg);
notification.publish();
}
}