Refactor subscription renewal process to utilize panel webhook

- Removed the recurring billing task from the bot, shifting the auto-renew functionality to the panel webhook service, which now triggers renewals 24 hours before expiry.
- Updated service dependencies to wire the subscription service with the panel webhook for seamless renewal handling.
- Adjusted the Subscription model to enable auto-renew by default, enhancing subscription management.
This commit is contained in:
machka-pasla
2025-09-03 10:22:02 +03:00
parent 6a3b4a6947
commit 09f0de78c6
5 changed files with 32 additions and 31 deletions
+1
View File
@@ -509,6 +509,7 @@ class SubscriptionService:
"traffic_limit_bytes": self.settings.user_traffic_limit_bytes,
"provider": provider,
"skip_notifications": provider == "tribute" and self.settings.TRIBUTE_SKIP_NOTIFICATIONS,
"auto_renew_enabled": True,
}
try:
new_or_updated_sub = await subscription_dal.upsert_subscription(