From 080c7109adabe9aebf8ff903614215ca94d85bca Mon Sep 17 00:00:00 2001 From: Philip Schatz Date: Mon, 26 Feb 2018 13:20:51 -0600 Subject: [PATCH] skip posting to the general channel to reduce the clutter in that channel --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index f1f13e1..472053e 100644 --- a/index.js +++ b/index.js @@ -57,6 +57,8 @@ module.exports = (robot) => { if (channelId === message.channel) { // Skip posting a message when the bot is in the same channel + } else if (robot.getBrain().getChannelById(channelId).is_general) { + // Skip posting to the special #general channel since everyone is in it } else if (robot.slackAdapter.isMemberOfChannel(channelId)) { // This bot is already in the channel so post there robot.log(`Posting to ${channelName}`)