AutoAnswer: add process test
GitLab: https://git.jami.net/savoirfairelinux/jami-daemon/-/issues/745
Change-Id: I54e5df2ffa44e779f52e5b404898c91d280ac1f6
diff --git a/AutoAnswer/BotPeerChatSubscriber.cpp b/AutoAnswer/BotPeerChatSubscriber.cpp
index 19760f5..8f2475a 100644
--- a/AutoAnswer/BotPeerChatSubscriber.cpp
+++ b/AutoAnswer/BotPeerChatSubscriber.cpp
@@ -60,6 +60,10 @@
else if (message->data.at("type") == "text/plain" && message->data.at("body") == input) {
sendMsg["type"] = "text/plain";
sendMsg["body"] = answer;
+#ifdef __DEBUG__
+ Plog::log(Plog::LogPriority::INFO, TAG, "input " + message->data.at("body"));
+ Plog::log(Plog::LogPriority::INFO, TAG, "ouput " + answer);
+#endif
}
if (!sendMsg.empty()) {
sendText(message->accountId, message->peerId, sendMsg, message->isSwarm);
@@ -106,6 +110,8 @@
sendMsg,
true);
botAnswer->isSwarm = swarm;
+#ifndef __DEBUG__
api_->invokeService(api_, "sendTextMessage", botAnswer.get());
+#endif
}
} // namespace jami