From b6f226f90fad4efd2417f89b83cf61b1e83999fe Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 20 Mar 2023 22:20:29 -0500 Subject: [PATCH] Fix for new blather version --- lib/blather_client.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/blather_client.rb b/lib/blather_client.rb index 29aec145b9e0a82b4644f6f6167a4d2e18efa1a8..8303dc1d79d89c41165e0009578baa0e990e84a2 100644 --- a/lib/blather_client.rb +++ b/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