feat(telegram): add allowed user gate (#179)

This commit is contained in:
banteg
2026-01-22 13:59:14 +04:00
committed by GitHub
parent 4272a2aef3
commit 656dcfdf31
7 changed files with 92 additions and 1 deletions
+2
View File
@@ -140,6 +140,7 @@ def test_telegram_backend_build_and_run_wires_config(
transport_config = TelegramTransportSettings(
bot_token="token",
chat_id=321,
allowed_user_ids=[7, 8],
voice_transcription=True,
voice_max_bytes=1234,
voice_transcription_model="whisper-1",
@@ -165,6 +166,7 @@ def test_telegram_backend_build_and_run_wires_config(
assert cfg.voice_transcription_model == "whisper-1"
assert cfg.voice_transcription_base_url == "http://localhost:8000/v1"
assert cfg.voice_transcription_api_key == "local"
assert cfg.allowed_user_ids == (7, 8)
assert cfg.files.enabled is True
assert cfg.files.allowed_user_ids == [1, 2]
assert cfg.topics.enabled is True