Skip to content

feat: support Bot API 10.4 - #46

Merged
darxnet merged 1 commit into
mainfrom
feat/bot-api-10.4
Nov 12, 2026
Merged

darxnet merged 1 commit into
mainfrom
feat/bot-api-10.4

Conversation

@darxnet

@darxnet darxnet commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Regenerates the bindings for Bot API 10.4 (widgets, ephemeral replies to callback queries, TON wallet, chat share themes, getUniqueGift, deleteBusinessAccountGift) and unblocks the nightly go-generate run, which has failed since 2026-11-09 on TestChatID_OmitZero: chat_id of sendMessage and the other send methods is optional now.

Changes

  • Context fills message_id and inline_message_id from a widget query (generator rule message_id → ctx.messageID()), so ctx.EditMessageWidgetData() targets the widget's message.
  • AutoAnswer answers widget queries too (15-second limit); ctx.AnswerWidgetQuery marks the update answered.
  • ctx.Ephemeral() and ctx.ReplyEphemeral(text): ephemeral reply to a callback query, to an ephemeral command, or to the sender. The callback query is still answered by AutoAnswer, as the API requires.
  • FilterWidgetQueryData, FilterWidgetQuerySignData, FilterWidgetQuerySentTransaction.
  • tgtest.WidgetQuery and tgtest.SharedWidgetQuery.
  • client.TopicLink(ctx, threadID) for t.me/<bot>/<thread_id>.
  • StoryAreaPosition kept as a deprecated alias of AreaPosition, so the rename is not breaking.
  • MessageEntityBankCardNumber, MessageEntityTonAddress, MessageEntityDateTime.
  • README sections on ephemeral replies and widgets.

Compatibility

No exported identifier was removed (checked against the diff of the generated files); the only rename is covered by the alias, hence feat:.

Testing

make lint (both modules) and make test (including sqlstore/sqlitetest) pass locally; new tests in bot_api_10_4_test.go.

Regenerate the bindings (widgets, ephemeral replies to callback queries,
TON wallet, chat share themes, getUniqueGift, deleteBusinessAccountGift)
and fix TestChatID_OmitZero, which blocked the nightly regeneration
because chat_id of sendMessage and the other send methods is optional now.

- Context fills message_id and inline_message_id from a widget query, so
  ctx.EditMessageWidgetData targets the widget's message.
- AutoAnswer answers widget queries too (15-second limit);
  AnswerWidgetQuery marks the update answered.
- ctx.Ephemeral and ctx.ReplyEphemeral: an ephemeral reply to a callback
  query, to an ephemeral command, or to the sender.
- FilterWidgetQueryData, FilterWidgetQuerySignData and
  FilterWidgetQuerySentTransaction.
- tgtest.WidgetQuery and tgtest.SharedWidgetQuery update constructors.
- client.TopicLink for links to topics in private chats with the bot.
- StoryAreaPosition stays as a deprecated alias of AreaPosition.
- MessageEntityBankCardNumber, MessageEntityTonAddress and
  MessageEntityDateTime constants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@darxnet
darxnet merged commit af91210 into main Nov 12, 2026
11 checks passed
@darxnet
darxnet deleted the feat/bot-api-10.4 branch November 12, 2026 10:50
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