Don't send a message if there are no listeners, duhhhhh;

This commit is contained in:
Benjamin Bouvier 2016-11-07 13:32:40 +01:00
parent 173381e242
commit febab43948
1 changed files with 3 additions and 0 deletions

View File

@ -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++)