test+release: stub auth in channel_posts fixture; map @brndnsvr

This commit is contained in:
Teknium 2026-05-18 22:51:30 -07:00
parent 84a9b81502
commit f1cefad8c2
2 changed files with 7 additions and 1 deletions

View file

@ -90,7 +90,12 @@ def telegram_adapter_cls(monkeypatch):
def _make_adapter(telegram_adapter_cls):
return telegram_adapter_cls(PlatformConfig(enabled=True, token="***", extra={}))
a = telegram_adapter_cls(PlatformConfig(enabled=True, token="***", extra={}))
# Channel posts have from_user=None. After PR #28494's fail-closed
# auth, the empty-allowlist adapter rejects all messages including
# channel posts. These tests focus on routing, not auth gating.
a._is_callback_user_authorized = lambda user_id, **_kw: True
return a
def _make_channel_message(text="channel id test @hermes_bot"):