fix(tgbotapi): webhook inline responses ('method=' not 'TelegramMethod=') and chunked response bodies - #15
Merged
Conversation
ReplyToResponse wrote 'TelegramMethod=' in the urlencoded webhook reply; the Bot API expects 'method=', so inline responses were silently ignored (by Telegram and by test emulators alike) and every reply fell back to direct API calls. MakeRequest skipped reading bodies without a Content-Length header (chunked responses), unmarshalling nil bytes. Found by chatwright e2e for the chess extension: the emulator parses the inline response exactly as Telegram documents it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RdhN3imH93tZ3M2mz9oFGi
trakhimenok
force-pushed
the
fix-webhook-inline-response
branch
from
July 27, 2026 10:50
243fe45 to
35f80a9
Compare
trakhimenok
force-pushed
the
main
branch
2 times, most recently
from
July 28, 2026 11:35
139aaee to
edb2a76
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes surfaced by chatwright e2e testing of the chess extension:
ReplyToResponsewroteTelegramMethod=instead ofmethod=in the urlencoded webhook reply. The Bot API expectsmethod(docs), so inline webhook responses have most likely been dead in production too — every reply silently fell back to direct API calls.MakeRequestonly read response bodies whenContentLength > 0— chunked/no-length responses (e.g. test emulators, some proxies) unmarshalled nil bytes.🤖 Generated with Claude Code
https://claude.ai/code/session_01RdhN3imH93tZ3M2mz9oFGi