summaryrefslogtreecommitdiffstats
path: root/messageengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'messageengine.cpp')
-rw-r--r--messageengine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/messageengine.cpp b/messageengine.cpp
index 9ea59a3..d2644e8 100644
--- a/messageengine.cpp
+++ b/messageengine.cpp
@@ -26,6 +26,7 @@
#include "responsemessage.h"
#include "telephonymessage.h"
#include "weathermessage.h"
+#include "voicemessage.h"
#include "signalcomposermessage.h"
#include <QJsonArray>
@@ -84,6 +85,7 @@ void MessageEngine::onDisconnected()
void MessageEngine::onTextMessageReceived(QString jsonStr)
{
+ jsonStr = jsonStr.simplified();
QJsonDocument jdoc(QJsonDocument::fromJson(jsonStr.toUtf8()));
if (jdoc.isEmpty()) {
qWarning() << "Received invalid JSON: empty appfw message";
@@ -138,6 +140,9 @@ void MessageEngine::onTextMessageReceived(QString jsonStr)
} else if (api == "bluetooth-map") {
message = new MapMessage;
type = MapEventMessage;
+ } else if (api == "vshl-core" ) {
+ message = new VoiceMessage;
+ type = VoiceEventMessage;
} else if (api == "signal-composer") {
message = new SignalComposerMessage;
type = SignalComposerEventMessage;