lib/blather/stream/client.rb in blather-0.8.1 vs lib/blather/stream/client.rb in blather-0.8.2
- old
+ new
@@ -6,20 +6,10 @@
LANG = 'en'
VERSION = '1.0'
NAMESPACE = 'jabber:client'
def start
- @parser = Parser.new self
- start_stream = <<-STREAM
- <stream:stream
- to='#{@to}'
- xmlns='#{NAMESPACE}'
- xmlns:stream='#{STREAM_NS}'
- version='#{VERSION}'
- xml:lang='#{LANG}'
- >
- STREAM
- send start_stream.gsub(/\s+/, ' ')
+ send "<stream:stream to='#{@to}' xmlns='#{NAMESPACE}' xmlns:stream='#{STREAM_NS}' version='#{VERSION}' xml:lang='#{LANG}'>"
end
def send(stanza)
stanza.from = self.jid if stanza.is_a?(Stanza) && !stanza.from.nil?
super stanza