~singpolyma/jmp-pay

4272d64961d5d294d84fa35fc258f85388d4aa8c — Stephen Paul Weber 1 year, 1 month ago 902324d
Onboarding gets the full command UI link

This is because they really aren't using the bot, but sending the big link to
everyone is not only ugly, but at least in gajim it makes the link not do anything.

Ideally we'd do something with pushed command list or xhtml-im or fallback
bodies, but using whispers makes that not easy at the moment, and we use
whispers because new customers don't have a cheogram route set yet.
1 files changed, 11 insertions(+), 3 deletions(-)

M bin/process_pending_btc_transactions
M bin/process_pending_btc_transactions => bin/process_pending_btc_transactions +11 -3
@@ 134,8 134,12 @@ class Plan
		def notify_approved
			@customer.notify(
				"Your JMP account has been approved. To complete " \
				"your signup, click/tap here: xmpp:cheogram.com " \
				"and send register jmp.chat to the bot."
				"your signup, click/tap this link: xmpp:cheogram.com " \
				"and send register jmp.chat to the bot.",
				"Your JMP account has been approved. To complete " \
				"your signup, click/tap this link: " \
				"xmpp:cheogram.com/CHEOGRAM%25jabber%3Aiq%3Aregister" \
				"?command;node=jabber%3Aiq%3Aregister"
			)
		end
	end


@@ 150,10 154,14 @@ class Customer
		@customer_id
	end

	def notify(body)
	def notify(body, onboarding_body=nil)
		jid = REDIS.get("jmp_customer_jid-#{@customer_id}")
		raise "No JID for #{customer_id}" unless jid

		if jid =~ /onboarding.cheogram.com/ && onboarding_body
			body = onboarding_body
		end

		BlatherNotify.say(
			CONFIG[:notify_using][:target].call(jid),
			CONFIG[:notify_using][:body].call(jid, body)