       else
         if message.reply_to
           if message.type == 'pong'
+            @logger.debug 'pong'
             @_lastPong = Date.now()
             delete @_pending[message.reply_to]
           else if message.ok

            return

        # find channel/group/dm and add it to history
        m = new Message @, message
        @emit 'message', m


        @_pongTimeout = setInterval =>
          if not @connected then return

          @logger.debug 'ping'
          @_send {"type": "ping"}
          if @_lastPong? and Date.now() - @_lastPong > 10000
            @logger.error "Last pong is too old: %d", (Date.now() - @_lastPong) / 1000
