From 1493a3e302ca2ddb8afd0412dce3847df62a3aa3 Mon Sep 17 00:00:00 2001 From: Mike Carey Date: Thu, 13 Jul 2017 09:35:17 -0400 Subject: [PATCH 1/2] Minor Updates --- src/help.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/help.js b/src/help.js index 9804d95..ec8243b 100644 --- a/src/help.js +++ b/src/help.js @@ -11,7 +11,7 @@ // /hubot/help // // Configuration: -// HUBOT_HELP_REPLY_IN_PRIVATE - if set to any avlue, all `hubot help` replies are sent in private +// HUBOT_HELP_REPLY_IN_PRIVATE - if set to any value, all `hubot help` replies are sent in private // HUBOT_HELP_DISABLE_HTTP - if set, no web entry point will be declared // HUBOT_HELP_HIDDEN_COMMANDS - comma-separated list of commands that will not be displayed in help // @@ -113,10 +113,10 @@ var getHelpCommands = function getHelpCommands (robot) { helpCommands = helpCommands.map((command) => { if (robotName.length === 1) { - return command.replace(/^hubot\s*/i, robotName) + return command.replace(/^hubot\s*/i, '@'+robotName) } - return command.replace(/^hubot/i, robotName) + return command.replace(/^hubot/i, '@'+robotName) }) return helpCommands.sort() From 009b643e8363a676abc42b38c76338b0071064c8 Mon Sep 17 00:00:00 2001 From: Mike Carey Date: Thu, 13 Jul 2017 09:55:39 -0400 Subject: [PATCH 2/2] Fixes #16 --- src/help.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/help.js b/src/help.js index ec8243b..a2f2545 100644 --- a/src/help.js +++ b/src/help.js @@ -76,7 +76,7 @@ module.exports = (robot) => { const emit = cmds.join('\n') - if (replyInPrivate && msg.message && msg.message.user && msg.message.user.name) { + if (replyInPrivate && msg.message && msg.message.user && msg.message.user.name && msg.message.user.name != msg.message.room) { msg.reply('replied to you in private!') return robot.send({ room: msg.message.user.name }, emit) } else {