From 7ce81fc75399a33d592b322728dd215862e55e94 Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Fri, 31 Aug 2018 20:21:49 +0700 Subject: [PATCH] blacklists --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index b6c3b0e..7885f43 100644 --- a/index.js +++ b/index.js @@ -130,6 +130,13 @@ xmpp.on('chat', function(from, message) { return; } + if (config.globals.blacklists) { + blaclists = config.globals.blacklists.split(','); + if (blacklists.indexOf(from.toLowerCase()) >= 0) { + return; + } + } + logger.info('Incoming message via XMPP ', {to: config.globals.jid, from: from, message: message}); if (warming_up) { -- 1.9.0