Fix presence

Stephen Paul Weber created

There were two handlers -- the more specific one was commented out? And
now that we only run the first matching handler, this caused all
subscriptions to be eaten.

Change summary

sgx-catapult.rb | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

Detailed changes

sgx-catapult.rb 🔗

@@ -313,7 +313,7 @@ module SGXcatapult
 		@gateway_features.uniq!
 	end
 
-	presence :subscribe? do |p|
+	subscription :request? do |p|
 		puts "PRESENCE1: #{p.inspect}"
 
 		# subscriptions are allowed from anyone - send reply immediately
@@ -804,12 +804,6 @@ module SGXcatapult
 		}.catch(&method(:panic))
 	end
 
-	subscription(:request?) do |s|
-		# TODO: are these the best to return?  really need '!' here?
-		#write_to_stream s.approve!
-		#write_to_stream s.request!
-	end
-
 	iq :get? do |i|
 		write_to_stream error_msg(i.reply, i.children, 'cancel', 'feature-not-implemented')
 	end