Add handler for KUnifiedPush messageReceived events

This commit is contained in:
Joshua Goins
2023-11-12 21:46:33 +00:00
parent 15ba6d58e2
commit 100f595026
4 changed files with 52 additions and 10 deletions

View File

@@ -116,6 +116,9 @@ Controller::Controller(QObject *parent)
connection->setupPushNotifications(endpoint);
}
});
connect(connector, &KUnifiedPush::Connector::messageReceived, this, [this](const QByteArray &data) {
NotificationsManager::instance().postPushNotification(data);
});
connector->registerClient(i18n("Receiving push notifications"));