fix(telegram): allow inline_query through the getUpdates filter

The alias module registers an inline-query handler, but pollingAllowedUpdates
listed only message and callback_query. Telegram filters getUpdates on its
side, so inline queries were dropped before reaching the bot — the handler
never ran, and the omission left no log line or error to debug from.

Adds a test tying the list to the kinds actually handled, since nothing else
would catch the next such gap.
This commit is contained in:
tiennm99 committed 2026-09-04 11:46:59 +07:00
1 parent b903d14fc2
commit eafeebb69c
3 files changed
+50 -7

No files matched your search

+9 -3
View File
@@ -68,9 +68,15 @@ is the payoff for storing a `file_id` rather than bytes.
`InlineQueryResultCachedVideoNote`, and substituting a plain video would change
what was saved. They stay reachable through `/insert` and `/<name>`.
**Inline mode must be enabled in BotFather** (`/setinline`) or Telegram never
delivers these updates and the handler is never called. This is a one-time
operational step that cannot be done from code.
**Two things gate inline mode, and both fail silently.**
1. `inline_query` must be in `pollingAllowedUpdates`
(`internal/telegram/client.go`). Telegram filters getUpdates server-side, so
a missing kind means the handler is never called — no log line, no error.
2. Inline mode must be enabled for the bot in BotFather (`/setinline`). Until
it is, Telegram does not offer the bot for inline use at all, so typing
`@botname` shows nothing. This is a one-time operational step that cannot be
done from code.
## Names