Commit Graph

256 Commits

Author SHA1 Message Date
Egor
cc54a7ad2f Merge pull request #2580 from xenral/main
feat(localization): add Persian (fa) locale support and wire it across app flows
2026-02-09 21:09:43 +03:00
Fringg
1cae7130bc fix: promo code max_uses=0 conversion and trial UX after promo activation
- Convert max_uses=0 to 999999 (unlimited) in cabinet and webapi routes,
  matching bot handler behavior. Fixes miniapp-created promo codes being
  immediately invalid due to is_valid check (current_uses < max_uses).
- Skip trial offer in post-registration keyboard when promo code already
  activated a subscription, showing "back to menu" button instead.
2026-02-09 17:13:11 +03:00
Ali Morshedzadeh
5482e609f8 Add initial Persian locale support and language handling updates 2026-02-09 16:53:50 +03:30
Fringg
c4794db1dd feat: add TRIAL_DISABLED_FOR setting to disable trial by user type
New setting allows granular control over trial availability:
- none: trial available for all (default)
- email: trial disabled for email users
- telegram: trial disabled for telegram users
- all: trial disabled for everyone

Enforced in bot handlers, cabinet API, and miniapp routes.
Automatically appears in admin panel as dropdown via CHOICES.
2026-02-07 00:19:25 +03:00
Fringg
b9352a5bd5 fix(autopay): exclude daily subscriptions from global autopay
- Skip daily tariff subscriptions in monitoring autopay cycle
- Filter daily subscriptions in get_subscriptions_for_autopay CRUD
- Block autopay menu and toggle for daily tariffs in bot handler
- Reject autopay enable for daily subscriptions in Cabinet API (HTTP 400)
- Reject autopay enable for daily subscriptions in MiniApp API (HTTP 400)
2026-02-05 07:10:52 +03:00
Egor
e85a2a58cf Update middleware.py 2026-01-27 14:29:40 +03:00
c0mrade
9a2aea038a chore: add uv package manager and ruff linter configuration
- Add pyproject.toml with uv and ruff configuration
- Pin Python version to 3.13 via .python-version
- Add Makefile commands: lint, format, fix
- Apply ruff formatting to entire codebase
- Remove unused imports (base64 in yookassa/simple_subscription)
- Update .gitignore for new config files
2026-01-24 17:45:27 +03:00
Egor
c9cbb81054 Add files via upload 2026-01-23 11:29:08 +03:00
Egor
7e16d0edee Add files via upload 2026-01-23 11:28:32 +03:00
Egor
f6b795e555 Update miniapp.py 2026-01-20 16:56:59 +03:00
Egor
c783884ace Update miniapp.py 2026-01-20 14:27:37 +03:00
Egor
c331c33321 Merge pull request #2356 from BEDOLAGA-DEV/dev5
Dev5
2026-01-20 02:20:14 +03:00
Egor
b7a05f7cd1 Update miniapp.py 2026-01-20 02:14:42 +03:00
Egor
dd396aa16d Update miniapp.py 2026-01-20 02:14:10 +03:00
Egor
4fbe07919c Merge pull request #2355 from BEDOLAGA-DEV/dev5
Dev5
2026-01-20 01:46:57 +03:00
Egor
1752f52197 Update miniapp.py 2026-01-20 01:39:50 +03:00
PEDZEO
da9997609b Add custom logging configuration to WebAPIServer to reduce WebSocket spam 2026-01-20 01:30:17 +03:00
Egor
18e8e38855 Update miniapp.py 2026-01-20 00:58:24 +03:00
PEDZEO
6a3e716ad2 Refactor logging levels in websocket.py files to use debug instead of info and warning for connection attempts and token validation. 2026-01-19 23:46:03 +03:00
Egor
26c78b6814 Update campaigns.py 2026-01-17 05:04:01 +03:00
Egor
3e1abcbd51 Update campaigns.py 2026-01-17 05:03:32 +03:00
Egor
ac87d47bf3 Add files via upload 2026-01-17 01:49:56 +03:00
Egor
9422b9421f Update miniapp.py 2026-01-16 00:51:53 +03:00
Egor
2e77c5b74e Update miniapp.py 2026-01-15 17:34:39 +03:00
Egor
75108682cc Update miniapp.py 2026-01-15 17:34:16 +03:00
PEDZEO
a53219525f Merge pull request #2284 from BEDOLAGA-DEV/buttons
Enhance ban notification system with delete functionality and improve…
2026-01-14 14:56:43 +03:00
PEDZEO
c868ef3b69 Enhance ban notification system with delete functionality and improved message formatting
- Added a new handler to delete ban notifications upon user interaction.
- Introduced a delete button in ban notifications for better user experience.
- Updated ban notification messages to include node information more prominently.
- Refactored the BanNotificationService to send messages with the delete button included.
2026-01-14 14:50:00 +03:00
PEDZEO
34b87cba88 Merge pull request #2283 from BEDOLAGA-DEV/buttons
Enhance ban notification messages and service to include node informa…
2026-01-14 14:10:24 +03:00
PEDZEO
3aa5e304c3 Enhance ban notification messages and service to include node information
- Updated ban notification messages to provide detailed reasons for account bans, including node information.
- Refactored the BanNotificationService to safely format messages with optional node details.
- Modified API routes and schemas to support the inclusion of node names in ban notifications.
2026-01-14 14:03:09 +03:00
PEDZEO
b49031ea72 Merge pull request #2282 from BEDOLAGA-DEV/buttons
Add ban notification messages and refactor notification service
2026-01-14 07:33:02 +03:00
PEDZEO
c02c5472a5 Update BanNotificationRequest schema to include new notification type for mobile network bans 2026-01-14 07:31:09 +03:00
PEDZEO
243eef066c Add ban notification messages and refactor notification service
- Introduced new ban notification messages for device limit, WiFi, and mobile network violations in the configuration.
- Refactored the BanNotificationService to utilize the new messages from the configuration for sending notifications.
- Added a new method to handle mobile network ban notifications.
- Updated API routes to support the new notification type for mobile network bans.
2026-01-14 07:25:09 +03:00
PEDZEO
3557c8c285 Merge pull request #2280 from BEDOLAGA-DEV/buttons
Implement custom days and traffic handling in subscription purchase flow
2026-01-14 06:41:05 +03:00
PEDZEO
84abf529de Implement custom days and traffic handling in subscription purchase flow
- Added new states for selecting custom days and traffic in the subscription process.
- Enhanced the tariff purchase handler to support custom days and traffic adjustments.
- Introduced new functions for formatting and displaying custom tariff previews.
- Updated the ban notification service to include a new notification type for WiFi bans.
- Modified API routes and schemas to accommodate the new notification type and its parameters.
2026-01-14 06:37:59 +03:00
Egor
fe4e261115 Merge pull request #2275 from BEDOLAGA-DEV/buttons
Buttons
2026-01-13 03:33:39 +03:00
PEDZEO
a686333603 Add support for custom days and traffic in tariffs
- Introduced fields for custom days and traffic in the tariff model, including enabling flags, pricing, and limits.
- Updated relevant routes and schemas to handle new tariff features.
- Implemented logic for purchasing and managing custom days and traffic in subscriptions.
- Added database migration scripts to accommodate new columns for tariffs and subscriptions.
2026-01-13 02:55:32 +03:00
Egor
808bc2d40b Update miniapp.py 2026-01-13 01:04:50 +03:00
Egor
2745b015d7 Update miniapp.py 2026-01-12 23:25:32 +03:00
PEDZEO
ac5850746e Merge pull request #2271 from BEDOLAGA-DEV/main
merge main
2026-01-12 22:25:49 +03:00
Egor
fe9feaf65d Update miniapp.py 2026-01-12 19:43:38 +03:00
Egor
cec597cfd9 Update miniapp.py 2026-01-12 19:34:04 +03:00
Egor
e4d54677fa Update miniapp.py 2026-01-12 19:25:25 +03:00
Egor
fab17702c5 Update miniapp.py 2026-01-12 18:57:13 +03:00
Egor
eb40d8f48a Update miniapp.py 2026-01-12 18:43:54 +03:00
Egor
bcef64bafa Update miniapp.py 2026-01-12 18:11:21 +03:00
Egor
0ac2a7a62b Update miniapp.py 2026-01-12 17:58:50 +03:00
Egor
c350195bfc Update miniapp.py 2026-01-12 17:58:25 +03:00
PEDZEO
15f6108674 feat(tariffs): добавлена поддержка докупки трафика и улучшения тарифов
- Реализована возможность докупки трафика для тарифов с новыми параметрами: traffic_topup_enabled, traffic_topup_packages и max_topup_traffic_gb.
- Обновлены схемы и маршруты для управления тарифами и трафиком.
- Добавлены новые эндпоинты для работы с докупкой трафика в мини-приложении.
- Обновлены настройки и логика для проверки доступности докупки трафика в зависимости от тарифа.
- Внедрены улучшения в обработку платежей через Freekassa.

Обновлён .env.example с новыми параметрами для режима тарифов.
2026-01-12 07:47:35 +03:00
PEDZEO
0e24a5505c feat(subscription): добавлены новые функции для управления тарифами и трафиком
- Обновлены схемы и маршруты для поддержки покупки тарифов и управления трафиком.
- Реализована синхронизация тарифов и серверов из RemnaWave при запуске.
- Добавлены новые параметры в тарифы: server_traffic_limits и allow_traffic_topup.
- Обновлены настройки и логика для проверки доступности докупки трафика в зависимости от тарифа.
- Внедрены новые эндпоинты для работы с колесом удачи и обработка платежей через Stars.

Обновлён .env.example с новыми параметрами для режима продаж подписок.
2026-01-12 07:41:10 +03:00
Egor
2619db3f40 Update miniapp.py 2026-01-11 05:56:24 +03:00