Add configurable welcome bonus days for referred signups
- add REFERRAL_WELCOME_BONUS_DAYS setting (default 3) in settings.py - document REFERRAL_WELCOME_BONUS_DAYS in .env.example - apply welcome bonus on first /start only for newly created users with referred_by_id - replace hardcoded 3 days with settings.REFERRAL_WELCOME_BONUS_DAYS - skip bonus flow when value is 0 or less - send user notification after successful bonus application - add i18n key referral_welcome_bonus_applied to ru.json and en.json
This commit is contained in:
@@ -170,6 +170,10 @@ class Settings(BaseSettings):
|
||||
default=True,
|
||||
description="When true, referral bonuses (for inviter and referee) are applied only once per invited user - on their first successful payment."
|
||||
)
|
||||
REFERRAL_WELCOME_BONUS_DAYS: int = Field(
|
||||
default=3,
|
||||
description="Welcome bonus days granted to a newly registered user who joined via referral link.",
|
||||
)
|
||||
LEGACY_REFS: bool = Field(
|
||||
default=True,
|
||||
description="Allow legacy referral links like ref_<telegram_id> to continue working. Defaults to True when unset."
|
||||
|
||||
Reference in New Issue
Block a user