From fa21549cac9098f49e2e32868acce461acd1b40d Mon Sep 17 00:00:00 2001 From: Fringg Date: Sat, 7 Mar 2026 06:00:29 +0300 Subject: [PATCH] fix: add activate hint to gift pending activation email link Append ?activate=1 to success page URL in recipient notification email for gift purchases with pending_activation status, so the frontend can distinguish buyer from recipient and show the activate button only to the recipient. --- app/services/guest_purchase_service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/services/guest_purchase_service.py b/app/services/guest_purchase_service.py index 52534b60..29c533d7 100644 --- a/app/services/guest_purchase_service.py +++ b/app/services/guest_purchase_service.py @@ -476,6 +476,9 @@ async def send_guest_notification( cabinet_base = (settings.CABINET_URL or '').rstrip('/') success_page_url = f'{cabinet_base}/buy/success/{purchase.token}' + # For gift pending activation: add hint so the recipient's success page shows the activate button + if is_pending_activation and purchase.is_gift: + success_page_url += '?activate=1' context = { 'tariff_name': tariff_name,