lib/logstash/outputs/hipchat.rb in logstash-output-hipchat-4.0.5 vs lib/logstash/outputs/hipchat.rb in logstash-output-hipchat-4.0.6

- old
+ new

@@ -8,11 +8,11 @@ # sending messages. class LogStash::Outputs::HipChat < LogStash::Outputs::Base config_name "hipchat" # The HipChat authentication token. - config :token, :validate => :string, :required => true + config :token, :validate => :password, :required => true # The ID or name of the room, support fieldref config :room_id, :validate => :string, :required => true # The name the message will appear be sent from, you can use fieldref @@ -40,12 +40,12 @@ require "hipchat" end def client @client ||= if @host.nil? || @host.empty? - HipChat::Client.new(@token, :api_version => "v2") + HipChat::Client.new(@token.value, :api_version => "v2") else - HipChat::Client.new(@token, :api_version => "v2", :server_url => server_url) + HipChat::Client.new(@token.value, :api_version => "v2", :server_url => server_url) end end def server_url "https://#{@host}"