From 1ff131076774853bf3253b6ee75d5d0a4bfd6d7e Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 14 Sep 2022 13:57:40 -0500 Subject: [PATCH] Search again if no tel selected --- lib/tel_selections.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/tel_selections.rb b/lib/tel_selections.rb index 8b309d9..73f96d4 100644 --- a/lib/tel_selections.rb +++ b/lib/tel_selections.rb @@ -55,9 +55,10 @@ class TelSelections reply.allowed_actions = [:next, :prev] reply.command << FormTemplate.render("tn_list", tns: tns) }.then { |iq| - next choose_tel if iq.prev? + tel = iq.form.field("tel")&.value + next choose_tel if iq.prev? || !tel - iq.form.field("tel").value.to_s.strip + tel.to_s.strip } end -- 2.38.5