|
|
@@ -57,6 +57,7 @@ function Slack(sess) {
|
|
|
this.data = new SlackData(this);
|
|
|
this.history = {};
|
|
|
this.connected = false;
|
|
|
+ this.active = true;
|
|
|
}
|
|
|
|
|
|
Slack.prototype.onRequest = function(knownVersion, cb) {
|
|
|
@@ -237,9 +238,11 @@ Slack.prototype.closeIfInnactive = function() {
|
|
|
};
|
|
|
|
|
|
Slack.prototype.ping = function() {
|
|
|
+ console.log("pinging");
|
|
|
this.rtm.send(JSON.stringify({
|
|
|
"id": ++this.rtmId
|
|
|
,"type": "ping"
|
|
|
+ ,"set_active": this.active
|
|
|
}));
|
|
|
};
|
|
|
|