Send complete, useful approval message on account activation

Stephen Paul Weber created

With link pointing to jmp-register until new-signup happens.

Change summary

bin/process_pending_btc_transactions | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

Detailed changes

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