From fc43c79413096a8899acd0c54345af90c19f95fa Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 9 Mar 2021 11:02:50 -0500 Subject: [PATCH] Send complete, useful approval message on account activation With link pointing to jmp-register until new-signup happens. --- bin/process_pending_btc_transactions | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/process_pending_btc_transactions b/bin/process_pending_btc_transactions index c8d1cc420c604d2bf48091374fd4c23c01571826..82ec47943e683d51236ab6545dbe5af445090092 100755 --- a/bin/process_pending_btc_transactions +++ b/bin/process_pending_btc_transactions @@ -164,7 +164,17 @@ class Plan ) insert(start: Date.today, expire: @go_until) REDIS.del("pending_plan_for-#{@customer.id}") - @customer.notify("Your account has been activated") + notify_approved + end + + def notify_approved + sid = REDIS.get("reg-sid_for-#{@customer.id}") + tel = REDIS.get("reg-session_tel-#{sid}").sub(/\+/, "%2B") + @customer.notify( + "Your JMP account has been approved. To complete " \ + "your signup, click/tap here: " \ + "https://jmp.chat/sp1a/register4/?sid=#{sid}&number=#{tel}" + ) end end end