3c96c2affd
1. Admin notification showed "renewal" instead of "first purchase" for new users because has_had_paid_subscription was set before notification. All 21 call sites now pass explicit purchase_type. 2. Partner referral not counted when mandatory channel subscription enabled. required_sub_channel_check saved campaign_id but not referrer_id from campaign.partner_user_id. Also removed duplicate DB query. 3. BOT_USERNAME auto-detection moved before web server start to close race window on /cabinet/branding/telegram-widget endpoint.