~singpolyma/sgx-jmp

f316c9b081322c2d2dbedc7ca00b3c978d1b135a — Stephen Paul Weber 2 years ago 6075955
If number search fails, send user error and ask to search again
1 files changed, 5 insertions(+), 1 deletions(-)

M lib/tel_selections.rb
M lib/tel_selections.rb => lib/tel_selections.rb +5 -1
@@ 41,7 41,11 @@ class TelSelections
			Command.reply { |reply|
				reply.allowed_actions = [:next]
				reply.command << FormTemplate.render("tn_search", error: error)
			}.then { |iq| choose_from_list(AvailableNumber.for(iq.form).tns) }
			}.then do |iq|
				choose_from_list(AvailableNumber.for(iq.form).tns)
			rescue StandardError
				choose_tel(error: $!.to_s)
			end
		end

		def choose_from_list(tns)