~singpolyma/dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] notify chatwoot on port-in req

Details
Message ID
<20241112171719.69203-1-phdavis1027@gmail.com>
DKIM signature
pass
Download raw message
Patch: +10 -5
---
 sgx_jmp.rb | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/sgx_jmp.rb b/sgx_jmp.rb
index cd2bb12..38c1daf 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|
		PortInOrder.parse(customer, iq.form).complete_with { |form|
			Command.reply { |reply|
				reply.allowed_actions = [:next]
				reply.command << form
			}.then(&:form)
		end
	}.then do |order|
		}.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
Details
Message ID
<ZzOOSlSQlCn2gzHy@singpolyma-beefy.lan>
In-Reply-To
<20241112171719.69203-1-phdavis1027@gmail.com> (view parent)
DKIM signature
pass
Download raw message
>---
> sgx_jmp.rb | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
>diff --git a/sgx_jmp.rb b/sgx_jmp.rb
>index cd2bb12..38c1daf 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|
>+		PortInOrder.parse(customer, iq.form).complete_with { |form|
> 			Command.reply { |reply|
> 				reply.allowed_actions = [:next]
> 				reply.command << form
> 			}.then(&:form)
>-		end
>-	}.then do |order|
>+		}.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)
>+		))

Hmm. did you try this? Did it work? I think you need to change the sgx to 
direct target notify_to for this blank JID idea to work. Like you see in the 
sims command.

>+
> 		Command.finish(
> 			"Your port-in request has been accepted, " \
> 			"support will contact you with next steps"
>-- 
>2.34.1
>
Reply to thread Export thread (mbox)