From febab439482b370e7bb1815be05133813f3775ec Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 7 Nov 2016 13:32:40 +0100 Subject: [PATCH] Don't send a message if there are no listeners, duhhhhh; --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 9a62283..89c0cef 100644 --- a/index.js +++ b/index.js @@ -167,6 +167,9 @@ var handlers = { function makeSay(body) { var whom = hookToChannel[body.object_kind] || []; return function say(msgs) { + if (!whom.length) { + return; + } if (msgs) { if (msgs instanceof Array) { for (var i = 0; i < msgs.length; i++)