Skip to content

Add Telegram Bot API 10.2 support - #83

Merged
iamwavecut merged 1 commit into
masterfrom
bot-api-10-2
Jul 14, 2026
Merged

Add Telegram Bot API 10.2 support#83
iamwavecut merged 1 commit into
masterfrom
bot-api-10-2

Conversation

@iamwavecut

Copy link
Copy Markdown
Collaborator

Summary

  • add the full Telegram Bot API 10.2 rich-message input contract, including all 21 input block types, explicit rich media, and voice notes
  • recursively prepare top-level and deeply nested rich media uploads without mutating caller-owned values
  • add ephemeral send parameters to the 12 supported methods and implement the complete edit/delete lifecycle
  • decode ephemeral messages, communities, and subscription updates, including Update.SentFrom support
  • document structured rich messages, uploads, ephemeral commands, the 15-second response window, communities, subscriptions, and Mini App origin protection

Compatibility

  • the new API surface is additive except that ReplyParameters.MessageID now uses omitempty, matching its conditionally required Bot API 10.2 contract
  • InputRichMessage is no longer comparable because it now contains typed slices for blocks and media
  • Bot API 10.2 does not deprecate or remove API fields
  • direct uploads remain intentionally unavailable for rich-message drafts, inline rich-message edits, and ephemeral media edits

Validation

  • go test -race -shuffle=on -count=1 -timeout=10m ./...
  • go vet ./...
  • git diff --check
  • dedicated Bot API 10.2 contract tests cover JSON discriminators, recursive multipart preparation, immutability, ephemeral parameters and lifecycle methods, incoming updates, and reply identifier compatibility

The external parity specification currently describes Bot API 10.1, so its tagged parity test reports the five new ephemeral methods and the two new parameters on the 12 supported send methods as expected extras. No temporary parity exceptions are included; once the external specification is updated to 10.2, the implementation is expected to pass without allowlisting.

@iamwavecut
iamwavecut requested a review from zhuk-kk as a code owner July 14, 2026 14:26
@iamwavecut

Copy link
Copy Markdown
Collaborator Author

API parity test fails is a known temporary issue because it relies on a 3rd party repo, but the API parity is tested locally.

@iamwavecut
iamwavecut merged commit b4e1586 into master Jul 14, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant