TG Bot: возможность включения белого списка

This commit is contained in:
Alexey Polyakov
2026-05-06 00:51:56 +03:00
parent 1ff974dfce
commit 0f2d946b98
4 changed files with 13 additions and 8 deletions

View File

@@ -45,6 +45,7 @@ class ServerConfig:
telegram_bot_token = os.getenv("telegram_bot_token") or "123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ"
telegram_bot_enabled = bool(os.getenv("telegram_bot_enabled")) or True
telegram_whitelist_ids = [x.strip() for x in os.getenv("telegram_whitelist_ids", "").split(",") if x.strip()]
telegram_whitelist_enabled = bool(os.getenv("telegram_whitelist_enabled")) or True
### origins
origins = [x.strip() for x in os.getenv("origins", "").split(",") if x.strip()] if os.getenv("origins") else None