           bot.Room(roomId).join (err, callback) ->
             bot.Room(roomId).listen()
 
-    bot.on "reconnect", (roomId) =>
+    bot.on "reconnect", (roomId) ->
       bot.Room(roomId).join (err, callback) ->
         bot.Room(roomId).listen()
 

      body = new Buffer(body)
      options.headers["Content-Length"] = body.length

    request = HTTPS.request options, (response) =>
      data = ""

      response.on "data", (chunk) =>
        data += chunk

      response.on "end", =>
        if response.statusCode >= 400
          switch response.statusCode
            when 401
              throw new Error "Invalid access token provided, campfire refused the authentication"
            else
              @robot.logger.error "Campfire error: #{response.statusCode}"

        try
          callback null, JSON.parse(data)
        catch err
          callback null, data or { }

      response.on "error", (err) =>
        @robot.logger.error "Campfire response error: #{err}"
        callback err, { }

    if method is "POST"

    else
      request.end()

    request.on "error", (err) ->
      logger.error "Campfire request error: #{err}"

