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; }