Onboarding gets the full command UI link
Stephen Paul Weber
created 2 years ago
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.
Change summary
bin/process_pending_btc_transactions | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
Detailed changes
@@ -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)