mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- every other plugin calls it a user, so just say user.
This commit is contained in:
parent
37a46265e6
commit
0a18b46003
2 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ class LogStash::Inputs::Xmpp < LogStash::Inputs::Base
|
|||
config_name "xmpp"
|
||||
|
||||
# The user or resource ID, like foo@example.com.
|
||||
config :identity, :validate => :string, :required => :true
|
||||
config :user, :validate => :string, :required => :true
|
||||
|
||||
# The xmpp password for the JID.
|
||||
config :password, :validate => :password, :required => :true
|
||||
|
@ -28,7 +28,7 @@ class LogStash::Inputs::Xmpp < LogStash::Inputs::Base
|
|||
require 'xmpp4r' # xmpp4r gem
|
||||
Jabber::debug = true if @debug
|
||||
|
||||
@client = Jabber::Client.new(Jabber::JID.new(@identity))
|
||||
@client = Jabber::Client.new(Jabber::JID.new(@user))
|
||||
@client.connect(@host) # it is ok if host is nil
|
||||
@client.auth(@password.value)
|
||||
@client.send(Jabber::Presence.new.set_type(:available))
|
||||
|
|
|
@ -7,7 +7,7 @@ class LogStash::Outputs::Xmpp < LogStash::Outputs::Base
|
|||
config_name "xmpp"
|
||||
|
||||
# The user or resource ID, like foo@example.com.
|
||||
config :identity, :validate => :string, :required => :true
|
||||
config :user, :validate => :string, :required => :true
|
||||
|
||||
# The xmpp password for the JID.
|
||||
config :password, :validate => :password, :required => :true
|
||||
|
@ -31,7 +31,7 @@ class LogStash::Outputs::Xmpp < LogStash::Outputs::Base
|
|||
public
|
||||
def connect
|
||||
Jabber::debug = true
|
||||
client = Jabber::Client.new(Jabber::JID.new(@identity))
|
||||
client = Jabber::Client.new(Jabber::JID.new(@user))
|
||||
client.connect(@host)
|
||||
client.auth(@password.value)
|
||||
return client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue