From 641f53189c7b0f645b8f084be60708d17598cc81 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Wed, 14 Nov 2018 09:59:16 +0100 Subject: [PATCH] Update bot code to log the whole received text message. This makes debugging easier and also allows users to assert on the message content inside the tests, etc. --- src/bot.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bot.coffee b/src/bot.coffee index e079ee3e..2329fda5 100644 --- a/src/bot.coffee +++ b/src/bot.coffee @@ -236,6 +236,7 @@ class SlackBot extends Adapter @robot.logger.debug "Received text message in channel: #{channel}, from: #{user.id} (bot)" SlackTextMessage.makeSlackTextMessage(user, undefined, undefined, event, channel, @robot.name, @robot.alias, @client, (error, message) => return @robot.logger.error "Dropping message due to error #{error.message}" if error + @robot.logger.debug "Received text message in channel: #{channel}, from: #{user.id} (bot), message: #(message.text)" @receive message ) @@ -247,6 +248,7 @@ class SlackBot extends Adapter @robot.logger.debug "Received text message in channel: #{channel}, from: #{user.id} (human)" SlackTextMessage.makeSlackTextMessage(user, undefined, undefined, event, channel, @robot.name, @robot.alias, @client, (error, message) => return @robot.logger.error "Dropping message due to error #{error.message}" if error + @robot.logger.debug "Received text message in channel: #{channel}, from: #{user.id} (human), message: #(message.text)" @receive message )