lib/blather_client.rb 🔗
@@ -57,9 +57,12 @@ class BlatherClient < Blather::Client
def call_handler(handler, guards, stanza)
result = if guards.first.respond_to?(:to_str)
found = stanza.find(*guards)
- handler.call(stanza, found) unless found.empty?
+ throw :pass if found.empty?
+
+ handler.call(stanza, found)
else
throw :pass if guarded?(guards, stanza)
+
handler.call(stanza)
end