>---> sgx_jmp.rb | 15 ++++++++++-----> 1 file changed, 10 insertions(+), 5 deletions(-)>>diff --git a/sgx_jmp.rb b/sgx_jmp.rb>index cd2bb12..b0aa2ff 100644>--- a/sgx_jmp.rb>+++ b/sgx_jmp.rb>@@ -847,16 +847,21 @@ Command.new(> reply.command << FormTemplate.render("lnp")> end> ]).then { |(customer, iq)|>- PortInOrder.parse(customer, iq.form).complete_with do |form|>+ order = PortInOrder.parse(customer, iq.form).complete_with { |form|> Command.reply { |reply|> reply.allowed_actions = [:next]> reply.command << form> }.then(&:form)>- end>- }.then do |order|>+ }>+>+ [order, customer]
Did you try this? It looks like you're putting a promise into a variable
then returning that promise as part of an array. I don't think that will do
what you need it to. It would if you did:
Promise.all([order, customer])
though in this case I probably would do:
...complete_with { |form|
# ...
}.then { |order| [order, customer] }
>+ }.then do |(order, customer)|> order_id = BandwidthIris::PortIn.create(order.to_h)[:order_id]>- BLATHER.join(CONFIG[:notify_admin], "sgx-jmp")>- BLATHER.say(CONFIG[:notify_admin], order.message(order_id), :groupchat)>+ customer.stanza_from(Blather::Stanza::Message.new(>+ Blather::JID.new(""),>+ order.message(order_id)>+ ))>+> Command.finish(> "Your port-in request has been accepted, " \> "support will contact you with next steps">-- >2.34.1>