From fb26925a164fcdc061e321cef8f76ed067b1b342 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 8 May 2017 14:06:15 +0100 Subject: [PATCH] Don't delete the bot intent --- lib/bridge.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/bridge.js b/lib/bridge.js index 09023a75..926f53bf 100644 --- a/lib/bridge.js +++ b/lib/bridge.js @@ -144,7 +144,6 @@ function Bridge(opts) { this._intents = { // user_id + request_id : Intent }; - this._intents["bot"] = null; this._intentLastAccessed = Object.create(null); // user_id + request_id : timestamp this._intentLastAccessedTimeout = null; this._membershipMap = { @@ -254,7 +253,6 @@ Bridge.prototype.run = function(port, config, appServiceInstance) { this._intents = { // user_id + request_id : Intent }; - this._intents["bot"] = this._botIntent; this.appService = appServiceInstance || new AppService({ homeserverToken: this.opts.registration.getHomeserverToken() @@ -811,8 +809,7 @@ Bridge.prototype.registerBridgeGauges = function(counterFunc) { var counts = counterFunc(); if (!("matrixGhosts" in counts)) { - // subtract 1 because of the bot intent - counts.matrixGhosts = Object.keys(self._intents).length - 1; + counts.matrixGhosts = Object.keys(self._intents).length; } return counts;