~singpolyma/sgx-jmp

b4391f1f46c31b8cb76705fb0dc38393415a6f2a — Stephen Paul Weber 2 years ago 4cc98aa
Fix copy-paste error

These lines won't work because not processing an iq or anything with a node
here.  Set up sentry in a sensible way for messages.
1 files changed, 4 insertions(+), 4 deletions(-)

M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +4 -4
@@ 140,24 140,24 @@ message to: /\Aaccount@/ do |m|
end

message to: /\Acustomer_/, from: /@#{CONFIG[:sgx]}(\/|\Z)/ do |m|
	sentry_hub = new_sentry_hub(iq, name: iq.node)
	sentry_hub = new_sentry_hub(m, name: "message_customer")
	Customer.for_customer_id(
		m.to.node.delete_prefix("customer_")
	).then { |customer|
		sentry_hub.current_scope.set_user(
			id: customer.customer_id,
			jid: iq.from.stripped.to_s
			jid: m.from.stripped.to_s
		)
		customer.stanza_to(m)
	}.catch { |e| panic(e, sentry_hub) }
end

message do |m|
	sentry_hub = new_sentry_hub(iq, name: iq.node)
	sentry_hub = new_sentry_hub(m, name: "message")
	Customer.for_jid(m.from.stripped).then { |customer|
		sentry_hub.current_scope.set_user(
			id: customer.customer_id,
			jid: iq.from.stripped.to_s
			jid: m.from.stripped.to_s
		)
		today = Time.now.utc.to_date
		EMPromise.all([