B Thibault 8 年 前
コミット
03aad9f52d
1 ファイル変更3 行追加0 行削除
  1. 3 0
      srv/src/slack.js

+ 3 - 0
srv/src/slack.js

@@ -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
     }));
 };