Skip to content

Commit

Permalink
Don't delete the bot intent
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed May 8, 2017
1 parent 8f60f3e commit fb26925
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/bridge.js
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fb26925

Please sign in to comment.