mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-11 03:13:46 +00:00
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:
1 parent
b903d14fc2
commit
eafeebb69c
3 files changed
+50
-7
No files matched your search
+9
-3
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user