lib/blather/stream/component.rb in blather-0.2.3 vs lib/blather/stream/component.rb in blather-0.3.0
- old
+ new
@@ -9,10 +9,10 @@
@client.stream_started(self)
else
super
end
- if node.element_name == 'stream:stream'
+ if node.namespaces.find_by_href('http://etherx.jabber.org/streams') && node.find_first('/stream:stream[not(stream:error)]')
send("<handshake>#{Digest::SHA1.hexdigest(@node['id']+@pass)}</handshake>")
end
end
protected