From 15938ac6214471a496077da9b56d6430a49a6efd Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Mon, 1 Oct 2018 17:05:02 +0530 Subject: [PATCH] patching runtime error --- connect/connectNotificationServer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connect/connectNotificationServer.js b/connect/connectNotificationServer.js index 7dcbc96..51ecb71 100644 --- a/connect/connectNotificationServer.js +++ b/connect/connectNotificationServer.js @@ -288,7 +288,7 @@ const handler = (topic, message, logger, callback) => { // filter out `notifications.connect.project.topic.created` events send by bot // because they create too much clutter and duplicate info const botIds = [config.TCWEBSERVICE_ID, config.CODERBOT_USER_ID]; - if (topic === BUS_API_EVENT.CONNECT.TOPIC.CREATED && botIds.contains(message.userId.toString())) { + if (topic === BUS_API_EVENT.CONNECT.TOPIC.CREATED && botIds.indexOf(message.userId.toString()) !== -1) { logger.info(`Ignoring, to avoid noise, Bot topic ${topic}`); return callback(null, []); }