M lib/web_register_manager.rb => lib/web_register_manager.rb +8 -2
@@ 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
M sgx_jmp.rb => sgx_jmp.rb +3 -1
@@ 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