Skip to content

36.0.0 - #368

Open
InsanusMokrassar wants to merge 11 commits into
masterfrom
36.0.0
Open

36.0.0#368
InsanusMokrassar wants to merge 11 commits into
masterfrom
36.0.0

Conversation

@InsanusMokrassar

@InsanusMokrassar InsanusMokrassar commented Jul 19, 2026

Copy link
Copy Markdown
Owner

THIS UPDATE CONTAINS SUPPORT OF TELEGRAM BOTS API 10.2

Bot API 10.2

Rich Messages

Ephemeral Messages

Communities

  • Introduced initial Communities support — linked supergroups, channels, and bots.
  • Added the class Community.
  • Added the class CommunityChatAdded with the corresponding field community_chat_added to the class Message.
  • Added the class CommunityChatRemoved with the corresponding field community_chat_removed to the class Message.
  • Added the field community to the class ChatFullInfo.

General

  • Added the class BotSubscriptionUpdated and the field subscription to the class Update for subscription changes.
  • Hardened Mini App security by restricting method usage to original domains, auto-enabling July 20, 2026. (Telegram-side enforcement — no library change required; changelog note only.)

Notes

Breaking changes (documented in CHANGELOG.md):

  • ReplyParameters.messageId/chatIdentifier are now nullable and ReplyParameters no longer implements WithMessageId (an ephemeral reply addresses its target via ephemeralMessageId).
  • The 4 group-family message impls and ExtendedBot gained trailing defaulted constructor parameters (positional construction / componentN destructuring must be updated).
  • reply(to = ...) now auto-detects an ephemeral to target and replies ephemerally (behavior change for existing code replying to a message with a non-null ephemeralMessageId).

Deferred (follow-up):

  • Ephemeral field threading through createResend/ResendMessage (a resend is always a regular message).
  • behaviour_builder ephemeral-specific triggers/waiters.

🤖 Generated with Claude Code

InsanusMokrassar and others added 11 commits July 19, 2026 17:11
Extend RichMessagesBot with the 36.0.0 rich-message input additions:
- rich_blocks: build a rich message from the typed InputRichBlocks DSL
  (InputRichMessageBlocks { }) instead of an HTML/Markdown string
- rich_blocks_draft: stream a draft-only thinking() blocks sequence via
  sendRichMessageDraft, then finalize with sendRichMessage
- onPhoto: embed a received photo into a rich message both via
  InputRichMessageMedia (tg://photo?id=) referenced from HTML and as a
  first-class photo() media block inside the blocks tree

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New EphemeralMessagesBot demonstrating the 36.0.0 ephemeral-message API:
- sendTextMessage with receiverUserId + callbackQueryId to send a message
  visible only to one user in a group, in response to a callback query
- PossiblyEphemeralMessage detection of ephemeral messages
- editEphemeralMessageText / deleteEphemeralMessage addressed by
  chatId + receiverUserId + ephemeralMessageId
- reply() smart-branch replying ephemerally to an ephemeral message, and the
  explicit replyToEphemeral form
- BotCommand.isEphemeral flag

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New CommunitiesBot demonstrating the 36.0.0 communities API:
- onCommunityChatAdded / onCommunityChatRemoved triggers for the
  community_chat_added / community_chat_removed service events
- reading the Community (id/name) from CommunityChatAdded
- ExtendedChat.community (ChatFullInfo.community) via getChat
- waitCommunityChatAdded expectation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New BotSubscriptionsBot demonstrating the 36.0.0 subscription-updates API:
- onBotSubscriptionUpdated trigger reading user / invoicePayload / state
- exhaustive handling of the typed BotSubscriptionUpdated.State sealed type
  (Active / Canceled / Failed data objects + Unknown value-class fallback)
- botSubscriptionUpdatedUpdatesFlow raw update flow
- waitBotSubscriptionUpdated expectation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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