From 92dc086698bddd7c66e9d54a80a41a1fdb584059 Mon Sep 17 00:00:00 2001 From: Ryan Sydnor Date: Mon, 28 Oct 2019 15:38:31 -0400 Subject: [PATCH] PR review changes --- lib/CoreBot.js | 2 +- lib/SlackBot.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/CoreBot.js b/lib/CoreBot.js index 46bd9be02..52cdcc05b 100755 --- a/lib/CoreBot.js +++ b/lib/CoreBot.js @@ -1585,7 +1585,7 @@ function Botkit(configuration) { })); botkit.webserver.use(express.static(static_dir)); - botkit.webserver.server = botkit.webserver.listen( + botkit.httpserver = botkit.webserver.listen( botkit.config.port, botkit.config.hostname, function() { diff --git a/lib/SlackBot.js b/lib/SlackBot.js index 4c6229b63..8074ea3bc 100755 --- a/lib/SlackBot.js +++ b/lib/SlackBot.js @@ -566,9 +566,10 @@ function Slackbot(configuration) { // normalize fields to match the rtm message format message.user = message.user.id; - // home and modal surfaces don't have channel IDs + // home and modal surfaces don't have channel IDs -.- + // we default channel ID to user ID so that string operations will still work if ((message.view && (message.view.type === 'home' || message.view.type === 'modal'))) { - message.channel = {}; + message.channel = message.user.id; } else { message.channel = message.channel.id; }