tp-blather 0.8.4 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,17 +6,15 @@ class Stream
6
6
  NAMESPACE = 'jabber:component:accept'
7
7
 
8
8
  def receive(node) # :nodoc:
9
- #if node.element_name == 'handshake'
10
- # ready!
11
- #else
9
+ if @state == :started
12
10
  super
13
- #end
14
- #
15
- #if @state != :started
16
- # if node.document.find_first('/stream:stream[not(stream:error)]', :xmlns => NAMESPACE, :stream => STREAM_NS)
17
- # send("<handshake>#{Digest::SHA1.hexdigest(@node['id']+@password)}</handshake>")
18
- # end
19
- #end
11
+ else
12
+ if node.element_name == 'handshake'
13
+ ready!
14
+ elsif node.document.find_first('/stream:stream[not(stream:error)]', :xmlns => NAMESPACE, :stream => STREAM_NS)
15
+ send("<handshake>#{Digest::SHA1.hexdigest(@node['id']+@password)}</handshake>")
16
+ end
17
+ end
20
18
  end
21
19
 
22
20
  def send(stanza)
@@ -1,3 +1,3 @@
1
1
  module Blather
2
- VERSION = '0.8.4'
2
+ VERSION = '0.8.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tp-blather
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: