gift accounts: $5 guest passes with time box, inviter ledger, auto member conversion
Operator feature: a member gives a friend access with $5 of credits, no OC membership. Cloudron user lands in the guests group (chat + dashboard only), LiteLLM team capped at GIFT_BUDGET with NO monthly reset, portal row marked account_type='gift' with gift_expires_at set, gift welcome email, newsletter subscription, and a gifts ledger recording inviter -> recipient (one gift per inviter per 30 days, one per recipient ever). Sweep safety: reconcile_memberships never deactivates a gift for lacking an OC contribution; reconcile_gift_lifecycles lapses gifts by their own rules (credits spent out, or the GIFT_DAYS time box) with member-deactivation semantics. Guests are excluded from Loomio/Matrix invite lists, the reinvite path, budget notices, the allowance reconciliation and the metrics member counts. Conversion: a gift whose OC identity appears under its own email converts automatically (webhook + sweep + /admin/provision all funnel through provision_member): group guests->members, cap lifted to allowance + carried credits, anchor day kept, congrats email, full member onboarding. /admin/gift-convert links a membership paid under a different OC email (members.oc_email, matched by the sweep and webhook). Fixture test: tests/test_gift_lifecycle.py (37 checks, network replaced by a raising guard).
This commit is contained in:
1 parent
73d8c61aa7
commit
6d9074eefe
4 files changed
+1159
-32
No files matched your search
+765
-30
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user