Fix initStripe load order, subscription webhook email, chat textarea #134
Reference in New Issue
Block a user
Delete Branch "fix/webhook-initstripe-textarea"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix initStripe load order bug (defer script ordering), fix subscription webhook email extraction (data.object path), and improve chat widget input to auto-growing textarea.
supabase_admin_invite re-sends a magic link for users who already have an account (e.g. signed up via attestation before paying) but does not touch their user_metadata — leaving plan as "free" after purchase. Fix: add supabase_admin_update_user (PUT /auth/v1/admin/users/{id}) and call it after every invite so user_metadata is always stamped with the correct plan, name, and stripe_customer_id. Idempotent for new and returning users. Also fix waitlist_upsert to use on_conflict=email,plan so the upsert works for users who already have a waitlist row from attestation, rather than silently failing on duplicate key.