From cba7fbe7438b5664a5e4b7e6cb7b6db9dc7d9515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=8B=D1=80=D1=86=D0=B5=D0=B2=20=D0=92=D0=B0=D0=B4?= =?UTF-8?q?=D0=B8=D0=BC=20=D0=98=D0=B3=D0=BE=D1=80=D0=B5=D0=B2=D0=B8=D1=87?= Date: Sun, 7 Apr 2024 17:47:45 +0300 Subject: [PATCH] Add missing changes in CHANGELOG.md --- crates/teloxide-core/CHANGELOG.md | 14 ++++++++--- .../src/payloads/set_sticker_set_thumb.rs | 25 ------------------- 2 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 crates/teloxide-core/src/payloads/set_sticker_set_thumb.rs diff --git a/crates/teloxide-core/CHANGELOG.md b/crates/teloxide-core/CHANGELOG.md index 18eb09ac..34deeed6 100644 --- a/crates/teloxide-core/CHANGELOG.md +++ b/crates/teloxide-core/CHANGELOG.md @@ -59,7 +59,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `set_sticker_keywords` - `set_sticker_mask_position` - Add parameter `emoji` to the `send_sticker` method - - Add field `needs_repainting` to the struct `Sticker` + - Add parameter `needs_repainting` to the `create_new_sticker_set` method + - Add field `needs_repainting` to the `Sticker` struct + - Added support for the creation of sticker sets with multiple initial stickers in `create_new_sticker_set` by replacing the parameters `sticker`, `emojis` and `mask_position` with the parameters `stickers` and `sticker_format`. + - Add support for .WEBP files in `create_new_sticker_set` and `add_sticker_to_set` + - Add support for .WEBP, .TGS, and .WEBM files in `upload_sticker_file` by replacing the parameter `png_sticker` with the parameters `sticker` and `sticker_format` [pr851]: https://github.com/teloxide/teloxide/pull/851 [pr887]: https://github.com/teloxide/teloxide/pull/887 @@ -122,12 +126,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `DefaultParseMode` now also requires that the supported requests implement `Clone` (as a user you should not notice anything changing) - Methods of the Message type: `delete_chat_photo`, `group_chat_created`, `super_group_chat_created`, `channel_chat_created`, `chat_migration`, `migrate_to_chat_id`, `migrate_from_chat_id` now return shared reference instead of owned value inside `Option` ([#982][pr982]) - Methods `delete_chat_photo`, `group_chat_created`, `super_group_chat_created`, `channel_chat_created` now return appropriate structs not `Option` ([#982][pr982]) -- Method `upload_sticker_file` now use `sticker` and `sticker_format` parameters instead of `png_sticker` ([#1040][pr1040]) -- Renamed `SendAnimation::thumb`, `SendAudio::thumb`, `SendDocument::thumb`, `SendVideo::thumb`, `SendVideoNote::thumb` into `thumbnail`([#1040][pr1040]) -- Renamed `set_sticker_set_thumb` into `set_sticker_set_thumbnail` ([#1040][pr1040]) +- Renamed `SendAnimation::thumb`, `SendAudio::thumb`, `SendDocument::thumb`, `SendSticker::thumb`, `SendVideo::thumb`, `SendVideoNote::thumb` into `thumbnail`([#1040][pr1040]) +- Renamed `{Animation, Audio, Document, Sticker, Video, VideoNote, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaVideo, StickerSet}::thumb` into `thumbnail` ([#1040][pr1040]) +- Renamed `StickerFormat::Raster` into `StickerFormat::Static` ([#1040][pr1040]) +- Renamed `set_sticker_set_thumb` into `set_sticker_set_thumbnail` and it's parameter `thumb` into `thumbnail` ([#1040][pr1040]) - Renamed `thumb_url`, `thumb_width`, `thumb_height` into `thumbnail_url`, `thumbnail_width`, `thumbnail_height` in `InlineQueryResultArticle`, `InlineQueryResultContact`, `InlineQueryResultDocument`, `InlineQueryResultLocation`, `InlineQueryResultVenue` ([#1040][pr1040]) - Renamed `thumb_url` into `thumbnail_url` in `InlineQueryResultPhoto`, `InlineQueryResultVideo` ([#1040][pr1040]) - Renamed `thumb_url` into `thumbnail_url` in `InlineQueryResultGif`, `InlineQueryResultMpeg4Gif` ([#1040][pr1040]) +- `InputSticker` now is the struct that is used as parameter-bucket for sticker-related functionality, previously it was a wrap over the `png`, `tgs` and `webm` files ([#1040][pr1040]) [pr852]: https://github.com/teloxide/teloxide/pull/853 [pr859]: https://github.com/teloxide/teloxide/pull/859 diff --git a/crates/teloxide-core/src/payloads/set_sticker_set_thumb.rs b/crates/teloxide-core/src/payloads/set_sticker_set_thumb.rs deleted file mode 100644 index 4fc93547..00000000 --- a/crates/teloxide-core/src/payloads/set_sticker_set_thumb.rs +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated by `codegen_payloads`, do not edit by hand. - -use serde::Serialize; - -use crate::types::{InputFile, True, UserId}; - -impl_payload! { - @[multipart = thumb] - /// Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns _True_ on success. - #[derive(Debug, Clone, Serialize)] - pub SetStickerSetThumb (SetStickerSetThumbSetters) => True { - required { - /// Name of the sticker set - pub name: String [into], - /// User identifier of sticker file owner - pub user_id: UserId, - } - optional { - /// A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/animated_stickers#technical-requirements for animated sticker technical requirements. Pass a _file\_id_ as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »]. Animated sticker set thumbnail can't be uploaded via HTTP URL. - /// - /// [More info on Sending Files »]: crate::types::InputFile - pub thumb: InputFile, - } - } -}