fix: ignore Telegram start pings

This commit is contained in:
Robert DaSilva 2026-05-23 15:18:57 -04:00 committed by Teknium
parent 8807b1c727
commit efa952531b
4 changed files with 59 additions and 0 deletions

View file

@ -26,6 +26,16 @@ def _make_runner():
return object.__new__(GatewayRunner)
def test_start_is_known_gateway_command():
"""Telegram sends /start automatically; gateway should intercept it as a no-op."""
from hermes_cli.commands import GATEWAY_KNOWN_COMMANDS, resolve_command
cmd = resolve_command("start")
assert "start" in GATEWAY_KNOWN_COMMANDS
assert cmd is not None
assert cmd.name == "start"
@pytest.mark.asyncio
async def test_help_sanitizes_slash_command_mentions_for_telegram(monkeypatch):
"""Telegram help output must not expose invalid uppercase/hyphenated slashes."""