Api icon indicating copy to clipboard operation
Api copied to clipboard

Support BOT API 7.0 (december 29 2023)

Open bernard-ng opened this issue 2 years ago • 2 comments

documentation : https://core.telegram.org/bots/api#december-29-2023

Tasks

Reactions

  • [x] Added the classes ReactionTypeEmoji and ReactionTypeCustomEmoji representing different types of reaction.
  • [x] Added updates about a reaction change on a message with non-anonymous reactions, represented by the class MessageReactionUpdated and the field message_reaction in the class Update. The bot must explicitly allow the update to receive it.
  • [x] Added updates about reaction changes on a message with anonymous reactions, represented by the class MessageReactionCountUpdated and the field message_reaction_count in the class Update. The bot must explicitly allow the update to receive it.
  • [x] Added the method setMessageReaction that allows bots to react to messages.
  • [x] Added the field available_reactions to the class Chat.

Replies 2.0

Link Preview Customization

  • [x] Allowed to explicitly specify the URL that will be used for link preview generation in outgoing text messages.
  • [x] Allowed to position link previews above the message text.
  • [x] Allowed to choose media size in link previews.
  • [x] Added the class LinkPreviewOptions and replaced the parameter disable_web_page_preview with link_preview_options in the methods sendMessage and editMessageText.
  • [x] Replaced the field disable_web_page_preview with link_preview_options in the class InputTextMessageContent.
  • [x] Added the field link_preview_options to the class Message with information about the link preview options used to send the message.

Block Quotation

  • [x] Added support for “blockquote” entities in received messages.
  • [x] Added support for “blockquote” entity parsing in “MarkdownV2” and “HTML” parse modes.
  • [x] Allowed to explicitly specify “blockquote” entities in formatted texts.

Multiple Message Actions

  • [x] Added the method deleteMessages to allow the deletion of multiple messages in a single request.
  • [x] Added the method forwardMessages for forwarding of multiple messages in a single request.
  • [x] Added the method copyMessages for copying of multiple messages in a single request.

Request for multiple users

  • [x] Renamed the class KeyboardButtonRequestUser to KeyboardButtonRequestUsers and added the field max_quantity to it.
  • [x] Renamed the field request_user in the class KeyboardButton to request_users. The old name will still work for backward compatibility.
  • [x] Added the class UsersShared.
  • [x] Replaced the field user_shared in the class Message with the field users_shared.

Chat Boost

Giveaway

  • [x] Added the class Giveaway and the field giveaway to the class Message for messages about scheduled giveaways.
  • [x] Added the class GiveawayCreated and the field giveaway_created to the class Message for service messages about the creation of a scheduled giveaway.
  • [x] Added the class GiveawayWinners and the field giveaway_winners to the class Message for messages about the completion of a giveaway with public winners.
  • [x] Added the class GiveawayCompleted and the field giveaway_completed to the class Message for service messages about the completion of a giveaway without public winners.

Web App Changes

  • [x] Added the field SettingsButton to the class WebApp.
  • [x] Added the fields header_bg_color, accent_text_color, section_bg_color, section_header_text_color, subtitle_text_color, destructive_text_color to the class ThemeParams.
  • [x] Web Apps no longer close when the method WebApp.openTelegramLink is called.

Other Changes

  • [x] Added support for the fields emoji_status_custom_emoji_id and emoji_status_expiration_date in the class Chat for non-private chats.
  • [x] Added the fields accent_color_id, background_custom_emoji_id, profile_accent_color_id, and profile_background_custom_emoji_id to the class Chat.
  • [x] Added the field has_visible_history to the class Chat.
  • [x] Added the class MessageOrigin and replaced the fields forward_from, forward_from_chat, forward_from_message_id, forward_signature, forward_sender_name, and forward_date with the field forward_origin of type MessageOrigin in the class Message.
  • [x] Improved documentation for the field message of the class callbackQuery and the field pinned_message of the class Message by adding the classes MaybeInaccessibleMessage and InaccessibleMessage.

bernard-ng avatar Apr 19 '24 02:04 bernard-ng

@iGusev I'm planning to work on this next week, should I start or wait until you're done with php 8.1 migration ?

bernard-ng avatar Jul 08 '24 21:07 bernard-ng

@iGusev I'm planning to work on this next week, should I start or wait until you're done with php 8.1 migration ?

In general, everything is ready there, minor issues with setting types remain

iGusev avatar Jul 09 '24 03:07 iGusev