fix(telegram): propagate extra base_url config

This commit is contained in:
LeonSGP43
2026-05-15 21:31:02 +08:00
committed by Teknium
parent e7a3e9934f
commit 434d508d0a
2 changed files with 26 additions and 0 deletions

View File

@@ -551,6 +551,26 @@ class TestLoadGatewayConfig:
assert config.platforms[Platform.TELEGRAM].extra["disable_link_previews"] is True
def test_bridges_telegram_extra_base_url_from_config_yaml(self, tmp_path, monkeypatch):
hermes_home = tmp_path / ".hermes"
hermes_home.mkdir()
config_path = hermes_home / "config.yaml"
config_path.write_text(
"telegram:\n"
" extra:\n"
" base_url: https://custom-proxy.example.com/bot\n",
encoding="utf-8",
)
monkeypatch.setenv("HERMES_HOME", str(hermes_home))
config = load_gateway_config()
assert (
config.platforms[Platform.TELEGRAM].extra["base_url"]
== "https://custom-proxy.example.com/bot"
)
def test_bridges_notice_delivery_from_config_yaml(self, tmp_path, monkeypatch):
hermes_home = tmp_path / ".hermes"
hermes_home.mkdir()