No tel picker yet, so just go to the webpage

Stephen Paul Weber created

Direct users to the homepage if they haven't selected a tel yet.  Not what we
want eventually, but better than crashing.

Change summary

lib/web_register_manager.rb | 10 ++++++++--
sgx_jmp.rb                  |  4 +++-
2 files changed, 11 insertions(+), 3 deletions(-)

Detailed changes

lib/web_register_manager.rb 🔗

@@ -28,8 +28,14 @@ class WebRegisterManager
 	end
 
 	class ChooseTel
-		def choose_tel(_iq)
-			raise "TODO"
+		def choose_tel(iq)
+			reply = iq.reply
+			reply.status = :completed
+			reply.note_type = :info
+			reply.note_text =
+				"You have not chosen a phone number yet, please return to " \
+				"https://jmp.chat and choose one now."
+			EMPromise.reject(reply)
 		end
 	end
 end

sgx_jmp.rb 🔗

@@ -100,7 +100,7 @@ def panic(e, hub=nil)
 	if e.is_a?(::Exception)
 		(hub || Sentry).capture_exception(e, hint: { background: false })
 	else
-		(hub || Sentry).capture_message(e, hint: { background: false })
+		(hub || Sentry).capture_message(e.to_s, hint: { background: false })
 	end
 	exit 1
 end
@@ -290,6 +290,8 @@ command :execute?, node: "jabber:iq:register", sessionid: nil do |iq|
 			customer,
 			web_register_manager
 		).then(&:write)
+	}.catch_only(Blather::Stanza) { |reply|
+		self << reply
 	}.catch { |e| panic(e, sentry_hub) }
 end