diff --git a/src/dashbot-google.js b/src/dashbot-google.js index 14f8e49..90b0fd2 100644 --- a/src/dashbot-google.js +++ b/src/dashbot-google.js @@ -22,12 +22,13 @@ function DashBotGoogle(apiKey, urlRoot, debug, printErrors, config) { throw new Error('YOU MUST SUPPLY THE ASSISTANT OBJECT TO DASHBOT!'); } that.assistantHandle = assistant; + if (!that.assistantHandle.getArgument("is_health_check")) { + that.assistantHandle.originalDoResponse = assistant.doResponse_; + that.assistantHandle.doResponse_ = dashbotDoResponse; - that.assistantHandle.originalDoResponse = assistant.doResponse_; - that.assistantHandle.doResponse_ = dashbotDoResponse; - - that.requestBody = assistant.body_; - that.logIncoming(assistant.body_, incomingMetadata); + that.requestBody = assistant.body_; + that.logIncoming(assistant.body_, incomingMetadata); + } }; function dashbotDoResponse(response, responseCode){ @@ -94,4 +95,4 @@ function DashBotGoogle(apiKey, urlRoot, debug, printErrors, config) { }; } -module.exports = DashBotGoogle; \ No newline at end of file +module.exports = DashBotGoogle;