2020-08-12 18:39:40 +02:00
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog ](https://keepachangelog.com/en/1.0.0/ ),
and this project adheres to [Semantic Versioning ](https://semver.org/spec/v2.0.0.html ).
2021-08-31 17:39:02 +02:00
## unreleased
2020-08-12 18:39:40 +02:00
2023-02-13 18:21:19 +01:00
### Added
- `ChatPermission::can_*` helper functions ([#851][pr851])
2023-02-20 15:44:08 +01:00
- `mentioned_users` functions for `CallbackQuery` , `Chat` , `ChatJoinRequest` , `ChatMemberUpdated` , `Game` , `Message` , `Poll` , `Update` which return all contained `User` instances ([#850][pr850])
- `Message::video_chat_participants_invited` ([#850][pr850])
- `Update::from` , a replacement for `Update::user` ([#850][pr850])
2023-02-21 15:28:51 +01:00
- `Seconds` type, which represents a duration is seconds ([#859][pr859])
2023-02-24 13:21:49 +01:00
- `VideoChatEnded::duration` field that was previously missed ([#859][pr859])
2023-06-05 13:38:35 +02:00
- `ThreadId` newtype over `MessageId` , used for identifying reply threads ([#887][pr887])
2023-07-29 12:03:10 +02:00
- `ChatId::as_user` ([#905][pr905])
2023-07-29 12:07:19 +02:00
- Implement `PartialEq<ChatId> for UserId` and `PartialEq<UserId> for ChatId` ([#905][pr905])
2023-07-29 12:09:09 +02:00
- `ChatId::{MIN, MAX}` ([#905][pr905])
2024-01-05 16:28:32 +01:00
- Missing `Message` getters ([#982][pr982]):
- `message_auto_delete_timer_changed`
- `write_access_allowed`
- `forum_topic_created`
- `forum_topic_edited`
- `forum_topic_closed`
- `forum_topic_reopened`
- `general_forum_topic_hidden`
- `general_forum_topic_unhidden`
- `video_chat_scheduled`
- `video_chat_started`
- `video_chat_ended`
- `web_app_data`
- `is_delete_chat_photo` , `is_group_chat_created` , `is_super_group_chat_created` , `is_channel_chat_created` functions to `Message` ([#982][pr982])
2024-02-06 04:41:52 +01:00
- Support for TBA 6.5 ([#954][pr954])
- Add `can_send_audios` , `can_send_documents` , `can_send_photos` , `can_send_videos` , `can_send_video_notes` , and `can_send_voice_notes` to `ChatPermissions` and `Restricted`
- Add `use_independent_chat_permissions` optional parameter to `restrict_chat_member` and `set_chat_permissions`
- Add `user_chat_id` field to `ChatJoinRequest`
- Add `KeyboardButtonRequestChat` and `ChatShared` types
- Add `RequestChat` variant to `ButtonRequest`
- Add `ChatShared` variant to `MessageKind`
- Add `shared_chat` method to `Message`
- Add `KeyboardButtonRequestUser` and `UserShared` types
- Add `RequestUser` variant to `ButtonRequest`
- Add `UserShared` variant to `MessageKind`
- Add `shared_user` method to `Message`
2024-04-04 19:55:57 +02:00
- Support for TBA 6.6 ([#1040](pr1040))
- Add methods for working with bot's description:
- `set_my_description`
- `get_my_description`
- `set_my_short_description`
- `get_my_short_description`
- Add methods for working with sticker sets:
- `set_custom_emoji_sticker_set_thumbnail`
- `set_sticker_set_title`
- `delete_sticker_set`
- `set_sticker_emoji_list`
- `set_sticker_keywords`
- `set_sticker_mask_position`
2024-06-11 18:30:09 +02:00
- Add parameter `emoji` to the `send_sticker` method to specify an emoji for just uploaded stickers
- Add support for the creation of custom emoji sticker sets in `create_new_sticker_set`
- Add parameter `needs_repainting` to the `create_new_sticker_set` methodto automatically change the color of emoji based on context (e.g., use text color in messages, accent color in statuses, etc.)
- Add field `needs_repainting` to the `Sticker` struct
- Add 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` .
2024-04-07 16:47:45 +02:00
- 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`
2024-06-11 18:30:09 +02:00
- Add the ability to specify search keywords for stickers added to sticker sets
- Add new type `StickerFormatFlags` with fields `is_animated` and `is_video`
- Add new method `Sticker::format` which returns the format of the sticker, the format is determined by the `StickerFormatFlags` of the `Sticker`
- Add missing fields `{InlineQueryResultGif, InlineQueryResultMpeg4Gif}::thumbnail_mime_type`
2024-07-08 21:26:52 +02:00
- Support for TBA 6.7 ([#1086](pr1086))
- Add support for launching [Web Apps ](https://core.telegram.org/bots/webapps ) from inline query results by replacing the parameters `switch_pm_text` and `switch_pm_parameter` of the method `answer_inline_query` with the parameter `button` of type `InlineQueryResultsButton`
- Add new fields:
- `web_app_name` to `WriteAccessAllowed`
- `switch_inline_query_chosen_chat` of the type `SwitchInlineQueryChosenChat` to `InlineKeyboardButton`
- `via_chat_folder_invite_link` to `ChatMemberUpdated`
- Add methods for working with bot's name:
- `set_my_name`
- `get_my_name`
- Add the ability to specify custom emoji entities using `HTML` and `MarkdownV2` formatting options for bots that purchased additional usernames on [Fragment ](https://fragment.com/ )
2024-07-08 22:25:05 +02:00
- Support for TBA 6.8 ([#1087](pr1087))
- Add the `MediaKind::Story`
- Add new fields
- `PollAnswer::voter` to support anonymous poll answers in chats
- `emoji_status_expiration_date` to `Chat` as part of the future `ChatFullInfo` type TBA type
- Add the `unpin_all_general_forum_topic_messages` method
2023-02-13 18:21:19 +01:00
[pr851]: https://github.com/teloxide/teloxide/pull/851
2023-06-05 13:38:35 +02:00
[pr887]: https://github.com/teloxide/teloxide/pull/887
2023-07-29 12:03:10 +02:00
[pr905]: https://github.com/teloxide/teloxide/pull/905
2023-12-16 12:46:29 +01:00
[pr982]: https://github.com/teloxide/teloxide/pull/982
2024-04-04 19:55:57 +02:00
[pr1040]: https://github.com/teloxide/teloxide/pull/1040
2024-07-08 21:26:52 +02:00
[pr1086]: https://github.com/teloxide/teloxide/pull/1086
2024-07-08 22:25:05 +02:00
[pr1087]: https://github.com/teloxide/teloxide/pull/1087
2023-02-13 18:21:19 +01:00
2023-02-15 13:45:52 +01:00
### Fixed
- Return types of `edit_message_live_location_inline` , `stop_message_live_location_inline` , and `set_game_score_inline` : `Message` => `True` ([#854][pr854])
- Remove `latitude` and `longitude` parameters from `stop_message_live_location` and `stop_message_live_location_inline` ([#854][pr854])
2023-09-20 12:23:24 +02:00
- Fix the type of `photo_size` ,`photo_width` and `photo_height` in the `send_invoice` method ([#936][pr936])
2024-01-11 12:26:26 +01:00
- Fix roundtrip de/serialization of `InlineQueryResult` ([#990][pr990])
2024-02-13 20:36:21 +01:00
- Deserialization of `ApiError::CantParseEntities` ([#839][pr839])
- Deserialization of empty (content-less) messages that can sometimes appear as a part of callback query ([#850][pr850], issue [#873][issue873])
2023-02-15 13:45:52 +01:00
2024-02-13 20:36:21 +01:00
[pr839]: https://github.com/teloxide/teloxide/pull/839
[pr879]: https://github.com/teloxide/teloxide/pull/879
[issue873]: https://github.com/teloxide/teloxide/issues/873
2023-02-15 13:45:52 +01:00
[pr854]: https://github.com/teloxide/teloxide/pull/854
2023-09-20 12:23:24 +02:00
[pr936]: https://github.com/teloxide/teloxide/pull/936
2024-01-11 12:26:26 +01:00
[pr990]: https://github.com/teloxide/teloxide/pull/990
2023-02-15 13:45:52 +01:00
2023-02-13 19:02:32 +01:00
### Changed
- Types of `Option<bool>` fields of `KeyboardMarkup` , `KeyboardRemove` and `ForceReply` to `bool` ([#853][pr853])
2023-02-15 13:48:45 +01:00
- Type of `KeyboardMarkup::input_field_placeholder` : `Option<String>` => `String` ([#853][pr853])
2023-02-24 13:21:49 +01:00
- The following fields now use `Seconds` type instead of `u32` , `u16` or `Duration` ([#859][pr859])
- `Animation::duration`
- `Audio::duration`
- `Chat::message_auto_delete_time`
- `Chat::slow_mode_delay`
- `InlineQueryResultLocation::live_period`
- `Location::live_period`
- `MessageAutoDeleteTimerChanged::message_auto_delete_time`
- `Poll::open_period`
- `Video::duration`
- `VideoNote::duration`
- `Voice::duration`
2023-02-21 15:28:51 +01:00
- `RequestError::MigrateToChatId` single fields type to `ChatId` ([#859][pr859])
- `RequestError::RetryAfter` single fields type to `Seconds` ([#859][pr859])
2023-04-24 17:31:11 +02:00
- `CallbackGame` , `ForumTopicClosed` , `ForumTopicReopened` , `GeneralForumTopicHidden` , `GeneralForumTopicUnhidden` and `WriteAccessAllowed` structures
are now defined as named (`struct S {}`) instead of unit (`struct S;`) in order to fix their deserialization ([#876][pr876])
2023-05-30 11:16:46 +02:00
- `Download` now uses GAT feature on the `Fut` and `Err` associated types, instead of a lifetime on the whole trait ([#885][pr885])
2023-06-05 13:43:39 +02:00
- Renamed `ForumTopic::message_thread_id` into `thread_id` ([#887][pr887])
- `ForumTopic::thread_id` and `Message::thread_id` now use `ThreadId` instead of `i32` ([#887][pr887])
2023-06-05 13:55:21 +02:00
- `message_thread_id` method parameters now use `ThreadId` instead of `i32` ([#887][pr887])
2023-06-05 14:04:45 +02:00
- `DiceEmoji` variant order ([#887][pr887])
- `Dice::value` now use `u8` , instead of `i32` ([#887][pr887])
2024-02-13 20:36:21 +01:00
- `Invoice::total_amount` , `LabeledPrice::amount` , `PreCheckoutQuery::total_amount` , `SuccessfulPayment::total_amount` now use `u32` , instead of `i32` ([#887][pr887])
2023-06-05 15:20:05 +02:00
- `Forward::message_id` and `Message::forward_from_message_id` now use `MessageId` instead of `i32` ([#887][pr887])
2023-06-05 15:21:56 +02:00
- `Poll::total_voter_count` and `PollOption::voter_count` now use `u32` instead of `i32` ([#887][pr887])
- `PollAnswer::option_ids` now use `u8` instead of `i32` ([#887][pr887])
2023-06-05 15:36:15 +02:00
- Use `u32` for sizes and `Seconds` for timespans in `InlineQueryResult*` ([#887][pr887])
2023-06-05 15:58:25 +02:00
- `SendGame::reply_to_message_id` , `SendSticker::reply_to_message_id` and `SendInvoice::reply_to_message_id` now use `MessageId` instead of `i32` ([#887][pr887])
2023-06-15 13:40:50 +02:00
- Use `UpdateId` for `Update::id` ([#892][pr892])
2023-10-04 18:01:46 +02:00
- MSRV (Minimal Supported Rust Version) was bumped from `1.64.0` to `1.68.0` ([#950][pr950])
2023-11-05 23:50:54 +01:00
- Add proper support for `edit_message_caption_inline` , `copy_message` , `answer_inline_query` , `answer_web_app_query` , `send_media_group` , `edit_message_media` , and `edit_message_media_inline` to `DefaultParseMode` adaptor ([#961][pr961])
- Note that now `DefaultParseMode` sets the default on `send` , instead of request creation
- `DefaultParseMode` now also requires that the supported requests implement `Clone` (as a user you should not notice anything changing)
2024-01-05 16:28:32 +01:00
- 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<True>` ([#982][pr982])
2024-01-21 14:14:48 +01:00
- MSRV (Minimal Supported Rust Version) was bumped from `1.68.0` to `1.70.0` ([#996][pr996])
2024-06-11 18:30:09 +02:00
- Changes in the existing API to support TBA6.6 ([#1040](pr1040))
- `InputSticker` was changed from enum to the struct
- `{Animation, Audio, Document, Sticker, Video, VideoNote, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaVideo, StickerSet}::thumb` has been renamed to `thumbnail`
- `{SendAnimation, SendAudio, SendDocument, SendSticker, SendVideo, SendVideoNote}::thumb` has been renamed to`thumbnail`
- Now `StickerFormat` is defined as the enum with the variants: `Static` , `Video` , `Animated` , so the previous variant `Raster` has been renamed to `Static`
- Method `StickerFormat::is_raster` has been renamed to `StickerFormat::is_static`
- Methods `StickerSet::{format, is_static, is_animated, is_video}` are deprecated now, due to the breaking change in TBA 7.2 API (which removes `StickerFormatFlags::{is_video, is_animated}` from the `StickerSet` class)
- Method `set_sticker_set_thumb` and it's parameter `thumb` have been renamed to `set_sticker_set_thumbnail` and `thumbnail` respectively
- Fields `{InlineQueryResultArticle, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultLocation, InlineQueryResultVenue}::{thumb_url, thumb_width, thumb_height}` have been renamed to `{thumbnail_url, thumbnail_width, thumbnail_height}` respectively
- Field `{InlineQueryResultPhoto, InlineQueryResultVideo, InlineQueryResultGif, InlineQueryResultMpeg4Gif}::thumb_url` has been renamed to `thumbnail_url`
2023-02-13 19:02:32 +01:00
[pr852]: https://github.com/teloxide/teloxide/pull/853
2023-02-21 15:28:51 +01:00
[pr859]: https://github.com/teloxide/teloxide/pull/859
2023-04-24 17:31:11 +02:00
[pr876]: https://github.com/teloxide/teloxide/pull/876
2023-05-30 11:16:46 +02:00
[pr885]: https://github.com/teloxide/teloxide/pull/885
2023-06-15 13:40:50 +02:00
[pr892]: https://github.com/teloxide/teloxide/pull/892
2023-10-04 18:01:46 +02:00
[pr950]: https://github.com/teloxide/teloxide/pull/950
2023-11-05 23:50:54 +01:00
[pr961]: https://github.com/teloxide/teloxide/pull/961
2024-01-21 14:14:48 +01:00
[pr996]: https://github.com/teloxide/teloxide/pull/996
2023-02-13 19:02:32 +01:00
2023-02-20 15:44:08 +01:00
### Deprecated
- `Update::user` , use `Update::from` instead ([#850][pr850])
[pr850]: https://github.com/teloxide/teloxide/pull/850
2024-02-06 04:41:52 +01:00
### Removed
2024-02-13 20:22:17 +01:00
2024-02-06 04:41:52 +01:00
- Remove `can_send_media_messages` from `ChatPermissions` ([#954][pr954])
- Remove `can_send_media_messages` field from `Restricted` ([#954][pr954])
2024-02-13 20:22:17 +01:00
- Previously deprecated items ([#1013][pr1013])
- `AutoSend` bot adaptor
2024-02-13 20:41:43 +01:00
- `ChatMemberKind::is_kicked` (use `is_banned` instead)
- `ChatMemberKind::is_creator` (use `is_owner` instead)
- `ChatMemberKind::{can_change_info, can_pin_messages, can_invite_users, can_manage_topics, can_send_polls, can_add_web_page_previews, can_send_other_messages, can_send_media_messages, can_send_messages}` (match on `ChatMemberKind` yourself)
- `ChatMemberStatus::is_present` (use `ChatMemberKind::is_present` instead)
2024-02-13 20:43:15 +01:00
- `InlineKeyboardButton::{text, kind}`
2024-02-13 20:44:32 +01:00
`teloxide::dispatching::{update_listeners, repls}` (use `reloxide::{update_listeners, repls}` instead)
2024-02-13 20:46:28 +01:00
- `Dispatcher::setup_ctrlc_handler` (use `enable_ctrlc_handler` on the builder instead)
2024-02-13 20:48:01 +01:00
- `BotCommands::ty` and `repls::{commands_repl, commands_repl_with_listener}` (use `CommandsRepl::{repl, repl_with_listener}` instead)
2024-02-13 22:15:08 +01:00
- `Message::chat_id` (use `.chat.id` )
- `Update::user` (use `Update::from` )
2024-02-13 22:17:15 +01:00
- `update_listeners::polling` (use `Polling::builder` instead)
2024-02-06 04:41:52 +01:00
[pr954]: https://github.com/teloxide/teloxide/pull/954
2024-02-13 20:22:17 +01:00
[pr1013]: https://github.com/teloxide/teloxide/pull/1013
2024-02-06 04:41:52 +01:00
2023-03-30 19:20:45 +02:00
2023-02-15 19:29:52 +01:00
## 0.9.1 - 2023-02-15
2023-02-03 13:53:36 +01:00
### Fixed
- `Update::user` now handles channel posts, chat member changes and chat join request updates correctly ([#835][pr835])
2023-01-31 10:25:58 +01:00
- In cases when `teloxide` can't deserialize an update, error now includes the full json value ([#826][pr826])
2023-02-15 15:14:28 +01:00
- Deserialization of topic messages ([#830][pr830])
2023-02-03 13:53:36 +01:00
[pr835]: https://github.com/teloxide/teloxide/pull/835
2023-01-31 10:25:58 +01:00
[pr826]: https://github.com/teloxide/teloxide/pull/826
2023-02-15 15:14:28 +01:00
[pr830]: https://github.com/teloxide/teloxide/pull/830
2023-02-03 13:53:36 +01:00
2023-02-15 19:53:08 +01:00
### Added
- `ApiError::ImageProcessFailed` ([#825][pr825])
[pr825]: https://github.com/teloxide/teloxide/pull/825
2023-01-17 17:29:41 +01:00
## 0.9.0 - 2023-01-17
2022-11-14 23:20:50 +01:00
### Changed
- The methods `ChatMember::{can_pin_messages, can_invite_users, can_change_info}` now take into account the permissions of `Restricted` chat member kind ([#764][pr764])
- The method `ChatMemberKind::is_present` now takes into account the value of `Restricted::is_member` field ([#764][pr764])
2022-11-17 09:54:40 +01:00
- The following functions were made `#[must_use]` :
- `MaskPoint::{new, point}`
- `StickerKind::{premium_animation, mask_position, custom_emoji_id}`
2023-01-13 01:22:34 +01:00
- `Option<bool>` fields of `Administrator` are now `bool` ([#800][pr800]):
2022-12-27 19:51:02 +01:00
- `can_post_messages`
- `can_edit_messages`
- `can_pin_messages`
- `can_manage_topics`
2024-01-21 20:27:25 +01:00
- `ApiError::NotFound` is replaced with `ApiError::InvalidToken` which correctly parses all currently known errors caused by invalid bot tokens ([#998][pr998])
[pr998]: https://github.com/teloxide/teloxide/pull/998
2022-11-14 23:20:50 +01:00
### Added
- `Restricted::{is_member, can_change_info, can_invite_users, can_pin_messages, can_send_polls}` fields ([#764][pr764])
- `ChatMember::can_send_polls` method ([#764][pr764])
2023-01-14 17:28:50 +01:00
- Support for Telegram Bot API [version 6.3 ](https://core.telegram.org/bots/api#november-5-2022 ) ([#789][pr789])
- Support for Telegram Bot API [version 6.4 ](https://core.telegram.org/bots/api#december-30-2022 ) ([#809][pr809])
2022-11-14 23:20:50 +01:00
[pr764]: https://github.com/teloxide/teloxide/pull/764
2023-01-14 17:28:50 +01:00
[pr764]: https://github.com/teloxide/teloxide/pull/789
2022-12-27 19:51:02 +01:00
[pr800]: https://github.com/teloxide/teloxide/pull/800
2023-01-14 17:28:50 +01:00
[pr809]: https://github.com/teloxide/teloxide/pull/809
2022-12-27 19:51:02 +01:00
### Deprecated
- `ChatMemberKind` methods ([#800][pr800]):
- `can_change_info`
- `can_invite_users`
- `can_pin_messages`
- `can_send_messages`
- `can_send_media_messages`
- `can_send_other_messages`
- `can_send_polls`
- `can_add_web_page_previews`
- `ChatMemberStatus::is_present` method ([#800][pr800])
### Fixed
2022-12-27 19:59:42 +01:00
- `ChatMemberKind::can_manage_chat` method now correctly returns `false` for non owner/administrator users ([#800][pr800])
2022-11-14 23:20:50 +01:00
2022-10-03 02:08:00 +02:00
## 0.8.0 - 2022-10-03
2022-11-14 23:20:50 +01:00
### Added
2022-09-25 19:12:07 +02:00
- Support for Telegram Bot API [version 6.2 ](https://core.telegram.org/bots/api#august-12-2022 ) ([#251][pr251])
[pr251]: https://github.com/teloxide/teloxide-core/pull/251
2022-09-23 16:20:32 +02:00
### Changed
2022-10-01 15:36:38 +02:00
- Removed `file_` prefix from `File` and `FileMeta` fields [#255][pr255]
2022-09-25 19:18:06 +02:00
- `Animation` , `Audio` , `Document` , `PassportFile` , `PhotoSize` , `Video` , `VideoNote` and `Voice` now contain `FileMeta` instead of its fields ([#253][pr253])
2022-10-01 15:36:38 +02:00
- Combined with `File` fields renaming, instead of `.file_size` you can write `.file.size` and similarly with other fields
2022-09-23 16:20:32 +02:00
- **You can now `.await` any `Request` !** ([#249][pr249])
- `Request` now requires `Self: IntoFuture`
- There is no need for `AutoSend` anymore
- MSRV (Minimal Supported Rust Version) was bumped from `1.58.0` to `1.64.0`
2022-10-01 15:04:31 +02:00
- Message id parameters and fields now use `MessageId` type instead of `i32` ([#254][pr254])
2022-09-25 19:12:07 +02:00
- Refactored `Sticker` and related types ([#251][pr251])
2022-09-23 16:20:32 +02:00
2022-09-25 19:18:06 +02:00
[pr253]: https://github.com/teloxide/teloxide-core/pull/253
2022-10-01 15:04:31 +02:00
[pr254]: https://github.com/teloxide/teloxide-core/pull/254
2022-10-01 15:36:38 +02:00
[pr255]: https://github.com/teloxide/teloxide-core/pull/255
2022-09-25 19:18:06 +02:00
2022-09-12 14:57:19 +02:00
### Removed
- Methods for creating `InlineQuery` ([#246][pr244])
[pr244]: https://github.com/teloxide/teloxide-core/pull/246
2022-11-14 23:20:50 +01:00
### Fixed
2022-09-23 17:00:22 +02:00
- `SetWebhook` request can now properly send certificate ([#250][pr250])
2022-09-25 19:13:50 +02:00
- Serialization of `InputSticker::Webm` ([#252][pr252])
2022-09-23 17:00:22 +02:00
[pr250]: https://github.com/teloxide/teloxide-core/pull/250
2022-09-25 19:13:50 +02:00
[pr252]: https://github.com/teloxide/teloxide-core/pull/252
2022-09-23 17:00:22 +02:00
2022-09-23 16:20:32 +02:00
### Deprecated
- `AutoSend` adaptor ([#249][pr249])
[pr249]: https://github.com/teloxide/teloxide-core/pull/249
2022-08-19 04:21:06 +02:00
## 0.7.1 - 2022-08-19
2022-08-19 04:05:25 +02:00
### Fixed
- `ErasedRequester<E>` now implements `Clone` even if `E` is not `Clone` ([#244][pr244])
[pr244]: https://github.com/teloxide/teloxide-core/pull/244
2022-08-04 16:22:00 +02:00
### Added
- `From<ApiError>` , `From<DownloadError>` and `From<std::io::Error>` impls for `RequestError` ([#241][pr241])
[pr241]: https://github.com/teloxide/teloxide-core/pull/241
2022-08-15 18:08:20 +02:00
### Changed
- More functions are now marked with `#[must_use]` ([#242][PR242])
[pr242]: https://github.com/teloxide/teloxide-core/pull/242
2022-07-19 11:53:17 +02:00
## 0.7.0 - 2022-07-19
2022-06-26 18:24:13 +02:00
### Added
- `InlineKeyboardButton::{pay, login, web_app, callback_game, pay}` constructors ([#231][pr231])
2022-06-26 19:59:27 +02:00
- Support for Telegram Bot API [version 6.1 ](https://core.telegram.org/bots/api#june-20-2022 ) ([#233][pr233])
2022-07-18 16:55:05 +02:00
- `StickerKind` that is now used instead of `is_animated` and `is_video` fields of `Sticker` and `StickerSet` ([#238][pr238])
[pr238]: https://github.com/teloxide/teloxide-core/pull/238
2022-06-26 18:24:13 +02:00
### Changed
2022-07-18 15:47:42 +02:00
- `InlineKeyboardButtonKind::Pay` 's only field now has type `True` ([#231][pr231])
- `file_size` fields are now always `u32` ([#237][pr237])
- `File` is now split into `File` and `FileMeta` , the latter is used in `UploadStickerFile` and `Sticker::premium_animation` ([#237][pr237])
[pr237]: https://github.com/teloxide/teloxide-core/pull/237
2022-06-26 18:24:13 +02:00
### Deprecated
- `InlineKeyboardButton::{text, kind}` functions ([#231][pr231])
[pr231]: https://github.com/teloxide/teloxide-core/pull/231
2022-06-26 17:33:32 +02:00
[pr233]: https://github.com/teloxide/teloxide-core/pull/233
2022-06-26 18:24:13 +02:00
2022-06-26 18:45:33 +02:00
### Removed
- `ChatPrivate::type_` field ([#232][pr232])
[pr232]: https://github.com/teloxide/teloxide-core/pull/232
2022-06-21 14:25:51 +02:00
## 0.6.3 - 2022-06-21
2022-06-19 23:35:41 +02:00
### Fixed
- Fix `Message::parse_caption_entities` ([#229][pr229])
[pr229]: https://github.com/teloxide/teloxide-core/pull/229
2022-06-16 21:06:09 +02:00
## 0.6.2 - 2022-06-16
2022-06-16 21:04:30 +02:00
### Fixed
2022-06-16 11:02:17 +02:00
- Fix `ChatPrivate` serialization ([#226][pr226])
2022-06-14 09:54:58 +02:00
- Build with particular crates versions (enable `"codec"` feature of `tokio-util` ) ([#225][pr225])
2022-06-12 11:06:34 +02:00
- Remove trailing `/` from `Message::url` (on ios it caused problems) ([#223][pr223])
2022-06-16 21:04:30 +02:00
- Fix incorrect panic in `User::is_channel` ([#222][pr222])
2022-06-03 15:17:43 +02:00
2022-06-16 11:02:17 +02:00
[pr226]: https://github.com/teloxide/teloxide-core/pull/226
2022-06-14 09:54:58 +02:00
[pr225]: https://github.com/teloxide/teloxide-core/pull/225
2022-06-03 15:17:43 +02:00
[pr222]: https://github.com/teloxide/teloxide-core/pull/222
2022-06-14 13:46:40 +02:00
### Added
2022-06-16 21:04:30 +02:00
- `Message::{url_of, comment_url, comment_url_of, url_in_thread, url_in_thread_of}` functions ([#223][pr223])
2022-06-14 13:46:40 +02:00
- Utilities to parse message entities (see `Message::parse_entities` ) ([#217][pr217])
2022-06-16 21:04:30 +02:00
[pr223]: https://github.com/teloxide/teloxide-core/pull/223
2022-06-14 13:46:40 +02:00
[pr212]: https://github.com/teloxide/teloxide-core/pull/212
2022-06-02 19:15:44 +02:00
## 0.6.1 - 2022-06-02
2022-06-16 21:04:30 +02:00
### Fixed
- Deserialization of `File` when `file_path` or `file_size` are missing ([#220][pr220])
2022-05-30 17:14:26 +02:00
- Correct how `NotFound` and `UserDeactivated` errors are deserialized ([#219][pr219])
2022-05-05 14:03:28 +02:00
2022-06-02 18:46:41 +02:00
[pr220]: https://github.com/teloxide/teloxide-core/pull/220
2022-05-30 17:14:26 +02:00
[pr219]: https://github.com/teloxide/teloxide-core/pull/219
2022-05-05 14:03:28 +02:00
2022-06-16 21:04:30 +02:00
### Added
- `is_*` methods to `ChatMemberStatus` analogous to the `ChatMember{,Kind}` methods ([#216][pr216])
- `ChatId` and `UserId` to the prelude ([#212][pr212])
[pr216]: https://github.com/teloxide/teloxide-core/pull/216
[pr212]: https://github.com/teloxide/teloxide-core/pull/212
2022-04-25 12:30:23 +02:00
## 0.6.0 - 2022-04-25
2022-04-21 18:10:52 +02:00
### Added
2022-04-25 12:25:35 +02:00
- Support for Telegram Bot API [version 6.0 ](https://core.telegram.org/bots/api#april-16-2022 ) ([#206][pr206], [#211][pr211])
2022-04-23 20:45:57 +02:00
- Note that some field were renamed
2022-04-25 08:03:29 +02:00
- Shortcut methods for `MessageEntity` ([#208][pr208], [#210][pr210])
2022-04-23 21:05:38 +02:00
[pr208]: https://github.com/teloxide/teloxide-core/pull/208
2022-04-25 12:25:35 +02:00
[pr206]: https://github.com/teloxide/teloxide-core/pull/206
2022-04-25 08:03:29 +02:00
[pr210]: https://github.com/teloxide/teloxide-core/pull/210
2022-04-25 12:25:35 +02:00
[pr211]: https://github.com/teloxide/teloxide-core/pull/211
2022-04-21 18:10:52 +02:00
2022-04-23 19:57:42 +02:00
### Changed
2022-04-25 12:25:35 +02:00
- Make `KeyboardMarkup` creation more convenient ([#207][pr207])
- Accept `IntoIterator` in `KeyboardMarkup::append_row` .
- Accept `Into<String>` instead of `String` in `InlineKeyboardButton::{url, callback, switch_inline_query, switch_inline_query_current_chat}` .
[pr207]: https://github.com/teloxide/teloxide-core/pull/207
2022-04-23 19:57:42 +02:00
2022-04-18 12:03:50 +02:00
## 0.5.1 - 2022-04-18
2022-04-18 11:52:22 +02:00
### Fixed
2022-04-25 12:25:35 +02:00
- Document the `errors` module.
2022-04-18 11:52:22 +02:00
2022-04-13 12:58:38 +02:00
## 0.5.0 - 2022-04-13
2022-04-10 17:04:30 +02:00
2022-04-02 18:59:41 +02:00
### Added
2022-04-10 17:28:15 +02:00
- `errors` module and `errors::AsResponseParameters` trait ([#130][pr130])
2022-08-04 16:22:00 +02:00
- `UserId::{url, is_anonymous, is_channel, is_telegram}` convenience functions ([#197][pr197])
2022-04-02 20:43:55 +02:00
- `User::{tme_url, preferably_tme_url}` convenience functions ([#197][pr197])
- `Me::username` and `Deref<Target = User>` implementation for `Me` ([#197][pr197])
2022-04-02 20:56:32 +02:00
- `Me::{mention, tme_url}` ([#197][pr197])
2022-04-08 13:57:16 +02:00
- `AllowedUpdate::ChatJoinRequest` ([#201][pr201])
2022-04-13 11:51:00 +02:00
- `ChatId::{is_user, is_group, is_channel_or_supergroup}` functions [#198][pr198]
2022-04-02 18:59:41 +02:00
[pr197]: https://github.com/teloxide/teloxide-core/pull/197
2022-04-02 22:21:18 +02:00
[pr198]: https://github.com/teloxide/teloxide-core/pull/198
2022-04-08 13:57:16 +02:00
[pr201]: https://github.com/teloxide/teloxide-core/pull/201
2022-04-02 18:59:41 +02:00
2022-04-02 16:26:18 +02:00
### Changed
- `user.id` now uses `UserId` type, `ChatId` now represents only _chat id_ , not channel username, all `chat_id` function parameters now accept `Recipient` [**BC**]
2024-02-13 20:36:21 +01:00
- Improve `Throttling` adaptor ([#130][pr130])
2022-04-10 17:28:15 +02:00
- Freeze when getting `RetryAfter(_)` error
- Retry requests that previously returned `RetryAfter(_)` error
- `RequestError::RetryAfter` now has a `Duration` field instead of `i32`
2022-04-02 16:26:18 +02:00
2022-04-02 23:40:50 +02:00
### Fixed
- A bug in `Message::url` implementation ([#198][pr198])
2022-04-13 12:58:38 +02:00
- Fix never ending loop that caused programs that used `Throttling` to never stop, see issue [#535][issue535] ([#130][pr130])
[issue535]: https://github.com/teloxide/teloxide/issues/535
[pr130]: https://github.com/teloxide/teloxide-core/pull/130
2022-04-02 23:40:50 +02:00
Hide bot token in errors
This fixes a potential[^1] security vulnerability -- if bot shows errors
from teloxide to the user & for some reason network error happened[^2]
the url of the request would be included in the error. Since TBA
includes bot token in the error this may lead to token leakage.
This commit fixes that issue by removing the token from the urls of
`reqwest::Error`, we try to only replace the token, but if we fail we
remove the whole url.
This can be tested by using a very low timeout value for the http
reqwest client:
```rust
let client = reqwest::Client::builder()
.timeout(std::time::Duration::from_millis(1))
.build()
.unwrap();
let bot = Bot::from_env_with_client(client).auto_send();
// see if the token is redacted when network error (timeout) happens
// while sending common requests
let _ = dbg!(bot.get_me().await);
// see if the token is redacted when network error (timeout) happens
// while downloading files ("path" is unimportant as the timeout is so
// low the request probably won't even be sent)
let _ = dbg!(bot.download_file_stream("path").next().await);
```
For me this gives the following result:
```text
[t.rs:26] bot.get_me().await = Err(
Network(
reqwest::Error {
kind: Request,
url: Url {
scheme: "https",
cannot_be_a_base: false,
username: "",
password: None,
host: Some(
Domain(
"api.telegram.org",
),
),
port: None,
path: "/token:redacted/GetMe",
query: None,
fragment: None,
},
source: TimedOut,
},
),
)
[t.rs:31] bot.download_file_stream("path").next().await = Some(
Err(
reqwest::Error {
kind: Request,
url: Url {
scheme: "https",
cannot_be_a_base: false,
username: "",
password: None,
host: Some(
Domain(
"api.telegram.org",
),
),
port: None,
path: "/file/token:redacted/path",
query: None,
fragment: None,
},
source: TimedOut,
},
),
)
```
Note that this commits parent is `d0be260` and not the current master
the master branch currently contains breaking changes (we'll need to
make a release from this brach directly).
[^1]: Note that there are recorded cases where the token got exposed.
[^2]: Note that this can be theoretically be controlled by the user when
sending/downloading bigger files.
2022-04-03 11:06:30 +02:00
## 0.4.5 - 2022-04-03
### Fixed
- Hide bot token in errors ([#200][200])
[200]: https://github.com/teloxide/teloxide-core/pull/200
2022-03-21 16:22:22 +01:00
## 0.4.4 - 2022-04-21
2022-03-18 11:13:38 +01:00
### Added
2022-03-16 18:09:47 +01:00
- `WrongFileIdOrUrl` and `FailedToGetUrlContent` errors ([#188][pr188])
2022-03-21 16:10:12 +01:00
- `NotFound` error ([#190][pr190])
2022-03-18 11:13:38 +01:00
- `HasPayload::with_payload_mut` function ([#189][pr189])
2022-03-16 18:09:47 +01:00
[pr188]: https://github.com/teloxide/teloxide-core/pull/188
2022-03-18 11:13:38 +01:00
[pr189]: https://github.com/teloxide/teloxide-core/pull/189
2022-03-21 16:10:12 +01:00
[pr190]: https://github.com/teloxide/teloxide-core/pull/190
2022-03-18 11:13:38 +01:00
2022-03-07 19:43:24 +01:00
## 0.4.3 - 2022-03-08
2022-03-03 00:15:18 +01:00
### Added
- `User::is_telegram` function ([#186][pr186])
[pr186]: https://github.com/teloxide/teloxide-core/pull/186
2022-02-20 19:12:57 +01:00
### Fixed
- `Update::chat()` now returns `Some(&Chat)` for `UpdateKind::ChatMember` , `UpdateKind::MyChatMember` ,
`UpdateKind::ChatJoinRequest` ([#184][pr184])
2022-03-02 23:48:09 +01:00
- `get_updates` timeouts (partially revert buggy [#180][pr180]) ([#185][pr185])
2022-02-20 19:12:57 +01:00
[pr184]: https://github.com/teloxide/teloxide-core/pull/184
2022-03-02 23:48:09 +01:00
[pr185]: https://github.com/teloxide/teloxide-core/pull/185
2022-02-20 19:12:57 +01:00
2022-03-02 23:48:09 +01:00
## 0.4.2 - 2022-02-17 [yanked]
2022-02-17 13:03:41 +01:00
2022-02-17 12:41:38 +01:00
### Deprecated
- `Message::chat_id` use `.chat.id` field instead ([#182][pr182])
[pr182]: https://github.com/teloxide/teloxide-core/pull/182
2022-02-17 12:10:39 +01:00
### Fixed
- Serialization of `SendPoll::type_` (it's now possible to send quiz polls) ([#181][pr181])
[pr181]: https://github.com/teloxide/teloxide-core/pull/181
2022-02-14 17:15:30 +01:00
### Added
- `Payload::timeout_hint` method to properly handle long running requests like `GetUpdates` ([#180][pr180])
[pr180]: https://github.com/teloxide/teloxide-core/pull/180
2022-02-13 19:08:40 +01:00
## 0.4.1 - 2022-02-13
2022-02-13 18:53:41 +01:00
### Fixed
- Deserialization of `UntilDate` ([#178][pr178])
[pr178]: https://github.com/teloxide/teloxide-core/pull/178
2022-02-03 15:48:36 +01:00
## 0.4.0 - 2022-02-03
2021-09-02 17:14:54 +02:00
### Added
2021-11-09 19:16:56 +01:00
- `ApiError::TooMuchInlineQueryResults` ([#135][pr135])
2021-12-28 14:57:47 +01:00
- `ApiError::NotEnoughRightsToChangeChatPermissions` ([#155][pr155])
2021-11-06 13:36:29 +01:00
- Support for 5.4 telegram bot API ([#133][pr133])
2022-01-11 13:38:42 +01:00
- Support for 5.5 telegram bot API ([#143][pr143], [#164][pr164])
2022-02-01 18:22:20 +01:00
- Support for 5.6 telegram bot API ([#162][pr162])
- Support for 5.7 telegram bot API ([#175][pr175])
2021-11-06 13:36:29 +01:00
- `EditedMessageIsTooLong` error ([#109][pr109])
2022-01-25 13:15:04 +01:00
- `UntilDate` enum and use it for `{Restricted, Banned}::until_date` ([#117][pr117])
2021-09-16 01:57:30 +02:00
- `Limits::messages_per_min_channel` ([#121][pr121])
2021-11-27 10:50:03 +01:00
- `media_group_id` field to `MediaDocument` and `MediaAudio` ([#139][pr139])
2021-11-27 19:33:33 +01:00
- `caption_entities` method to `InputMediaPhoto` ([#140][pr140])
2021-12-25 02:12:59 +01:00
- `User::is_anonymous` and `User::is_channel` functions ([#151][pr151])
2021-12-29 16:37:36 +01:00
- `UpdateKind::Error` ([#156][pr156])
2021-08-21 19:39:57 +02:00
[pr109]: https://github.com/teloxide/teloxide-core/pull/109
2022-01-25 13:15:04 +01:00
[pr117]: https://github.com/teloxide/teloxide-core/pull/117
2021-09-16 01:57:30 +02:00
[pr121]: https://github.com/teloxide/teloxide-core/pull/121
2021-11-09 19:16:56 +01:00
[pr135]: https://github.com/teloxide/teloxide-core/pull/135
2021-11-27 10:50:03 +01:00
[pr139]: https://github.com/teloxide/teloxide-core/pull/139
2021-11-27 19:33:33 +01:00
[pr140]: https://github.com/teloxide/teloxide-core/pull/140
2021-12-10 14:02:28 +01:00
[pr143]: https://github.com/teloxide/teloxide-core/pull/143
2021-12-25 02:12:59 +01:00
[pr151]: https://github.com/teloxide/teloxide-core/pull/151
2021-12-28 14:57:47 +01:00
[pr155]: https://github.com/teloxide/teloxide-core/pull/155
2021-12-29 16:37:36 +01:00
[pr156]: https://github.com/teloxide/teloxide-core/pull/156
2022-02-01 18:22:20 +01:00
[pr162]: https://github.com/teloxide/teloxide-core/pull/162
2022-01-11 13:38:42 +01:00
[pr164]: https://github.com/teloxide/teloxide-core/pull/164
2022-02-01 18:22:20 +01:00
[pr175]: https://github.com/teloxide/teloxide-core/pull/175
2021-09-02 17:14:54 +02:00
### Changed
2022-01-13 15:19:02 +01:00
- Refactor `InputFile` ([#167][pr167])
- Make it an opaque structure, instead of enum
- Add `read` constructor, that allows creating `InputFile` from `impl AsyncRead`
- Internal changes
2021-11-07 21:55:38 +01:00
- Refactor errors ([#134][pr134])
- Rename `DownloadError::NetworkError` to `Network`
- Rename `RequestError::ApiError` to `Api`
- Remove `RequestError::Api::status_code` and rename `RequestError::Api::kind` to `0` (struct to tuple struct)
- Rename `RequestError::NetworkError` to `Network`
- Implement `Error` for `ApiError`
2021-09-02 17:14:54 +02:00
- Use `url::Url` for urls, use `chrono::DateTime<Utc>` for dates in types ([#115][pr115])
2021-10-11 09:44:06 +02:00
- Mark `ApiError` as `non_exhaustive` ([#125][pr125])
2021-11-06 13:36:29 +01:00
- `InputFile` and related structures now do **not** implement `PartialEq` , `Eq` and `Hash` ([#133][pr133])
2021-12-25 02:23:54 +01:00
- How forwarded messages are represented ([#151][pr151])
2024-02-13 20:36:21 +01:00
- `RequestError::InvalidJson` now has a `raw` field with raw json for easier debuggability ([#150][pr150])
2021-12-29 18:36:08 +01:00
- `ChatPermissions` is now bitflags ([#157][pr157])
2022-02-01 16:30:40 +01:00
- Type of `WebhookInfo::ip_address` from `Option<String>` to `Option<std::net::IpAddr>` ([#172][pr172])
- Type of `WebhookInfo::allowed_updates` from `Option<Vec<String>>` to `Option<Vec<AllowedUpdate>>` ([#174][pr174])
2021-09-02 17:14:54 +02:00
2021-08-31 16:45:20 +02:00
[pr115]: https://github.com/teloxide/teloxide-core/pull/115
2021-10-11 09:44:06 +02:00
[pr125]: https://github.com/teloxide/teloxide-core/pull/125
2021-11-07 21:55:38 +01:00
[pr134]: https://github.com/teloxide/teloxide-core/pull/134
2021-12-24 13:47:54 +01:00
[pr150]: https://github.com/teloxide/teloxide-core/pull/150
2021-12-29 18:36:08 +01:00
[pr157]: https://github.com/teloxide/teloxide-core/pull/157
2022-01-13 15:19:02 +01:00
[pr167]: https://github.com/teloxide/teloxide-core/pull/167
2022-01-27 18:25:40 +01:00
[pr172]: https://github.com/teloxide/teloxide-core/pull/172
2022-02-01 16:30:40 +01:00
[pr174]: https://github.com/teloxide/teloxide-core/pull/174
2021-08-21 19:39:57 +02:00
2021-09-02 17:14:54 +02:00
### Fixed
2021-12-10 15:00:49 +01:00
- Deserialization of chat migrations, see issue [#427][issue427] ([#143][pr143])
2022-01-25 13:15:04 +01:00
- Type of `BanChatMember::until_date` : `u64` -> `chrono::DateTime<Utc>` ([#117][pr117])
2021-09-07 16:24:13 +02:00
- Type of `Poll::correct_option_id` : `i32` -> `u8` ([#119][pr119])
- Type of `Poll::open_period` : `i32` -> `u16` ([#119][pr119])
2021-09-16 01:57:30 +02:00
- `Throttle` adaptor not honouring chat/min limits ([#121][pr121])
2022-01-25 13:15:04 +01:00
- Make `SendPoll::type_` optional ([#133][pr133])
2021-11-20 17:36:52 +01:00
- Bug with `caption_entities` , see issue [#473][issue473]
2022-04-23 21:05:38 +02:00
- Type of response for `CopyMessage` method ([#141][pr141], [#142][pr142])
- Bad request serialization when the `language` field of `MessageEntityKind::Pre` is `None` ([#145][pr145])
2021-12-19 16:52:03 +01:00
- Deserialization of `MediaKind::Venue` ([#147][pr147])
2021-12-25 02:48:44 +01:00
- Deserialization of `VoiceChat{Started,Ended}` messages ([#153][pr153])
2021-12-28 14:09:40 +01:00
- Serialization of `BotCommandScope::Chat{,Administrators}` ([#154][pr154])
2021-09-02 17:14:54 +02:00
2021-09-07 16:47:10 +02:00
[pr119]: https://github.com/teloxide/teloxide-core/pull/119
2021-11-06 13:36:29 +01:00
[pr133]: https://github.com/teloxide/teloxide-core/pull/133
2021-12-06 20:51:51 +01:00
[pr141]: https://github.com/teloxide/teloxide-core/pull/141
2021-12-06 23:31:49 +01:00
[pr142]: https://github.com/teloxide/teloxide-core/pull/142
2021-12-10 15:00:49 +01:00
[pr143]: https://github.com/teloxide/teloxide-core/pull/143
2021-12-15 17:41:04 +01:00
[pr145]: https://github.com/teloxide/teloxide-core/pull/145
2021-12-19 16:52:03 +01:00
[pr147]: https://github.com/teloxide/teloxide-core/pull/147
2021-12-25 02:48:44 +01:00
[pr153]: https://github.com/teloxide/teloxide-core/pull/153
2021-12-28 14:09:40 +01:00
[pr154]: https://github.com/teloxide/teloxide-core/pull/154
2021-11-20 17:36:52 +01:00
[issue473]: https://github.com/teloxide/teloxide/issues/473
2021-12-10 15:00:49 +01:00
[issue427]: https://github.com/teloxide/teloxide/issues/427
2021-09-16 01:57:30 +02:00
2021-12-29 16:37:36 +01:00
### Removed
- `get_updates_fault_tolerant` method and `SemiparsedVec` ([#156][pr156])
2021-08-31 16:59:49 +02:00
## 0.3.3 - 2021-08-03
2021-08-03 01:29:26 +02:00
### Fixed
- Compilation with `nightly` feature (use `type_alias_impl_trait` instead of `min_type_alias_impl_trait` ) ([#108][pr108])
[pr108]: https://github.com/teloxide/teloxide-core/pull/108
2021-07-27 11:58:11 +02:00
## 0.3.2 - 2021-07-27
2021-07-08 12:04:40 +02:00
### Added
2021-07-12 15:58:51 +02:00
- `ErasedRequester` bot adaptor, `ErasedRequest` struct, `{Request, RequesterExt}::erase` functions ([#105][pr105])
2021-07-10 16:41:20 +02:00
- `Trace` bot adaptor ([#104][pr104])
2021-07-08 12:04:40 +02:00
- `HasPayload` , `Request` and `Requester` implementations for `either::Either` ([#103][pr103])
[pr103]: https://github.com/teloxide/teloxide-core/pull/103
2021-07-10 16:41:20 +02:00
[pr104]: https://github.com/teloxide/teloxide-core/pull/104
2021-07-12 15:58:51 +02:00
[pr105]: https://github.com/teloxide/teloxide-core/pull/105
2021-07-08 12:04:40 +02:00
2021-07-07 19:13:02 +02:00
## 0.3.1 - 2021-07-07
2021-07-07 19:06:58 +02:00
- Minor documentation tweaks ([#102][pr102])
2021-07-08 12:04:40 +02:00
- Remove `Self: 'static` bound on `RequesterExt::throttle` ([#102][pr102])
2021-07-07 19:06:58 +02:00
[pr102]: https://github.com/teloxide/teloxide-core/pull/102
2021-07-05 18:53:42 +02:00
## 0.3.0 - 2021-07-05
2021-07-04 15:28:00 +02:00
2021-03-30 11:17:49 +02:00
### Added
2021-06-18 12:28:47 +02:00
- `impl Clone` for {`CacheMe`, `DefaultParseMode` , `Throttle` } ([#76][pr76])
2021-03-30 11:31:44 +02:00
- `DefaultParseMode::parse_mode` which allows to get currently used default parse mode ([#77][pr77])
2024-02-13 20:36:21 +01:00
- `Throttle::{limits,set_limits}` functions ([#77][pr77])
2021-07-03 21:34:31 +02:00
- `Throttle::{with_settings,spawn_with_settings}` and `throttle::Settings` ([#96][pr96])
2022-08-04 16:22:00 +02:00
- Getters for fields nested in `Chat` ([#80][pr80])
2021-04-28 10:24:14 +02:00
- API errors: `ApiError::NotEnoughRightsToManagePins` , `ApiError::BotKickedFromSupergroup` ([#84][pr84])
2021-05-04 15:56:27 +02:00
- Telegram bot API 5.2 support ([#86][pr86])
2021-07-04 14:46:12 +02:00
- Telegram bot API 5.3 support ([#99][pr99])
2021-05-12 10:51:03 +02:00
- `net::default_reqwest_settings` function ([#90][pr90])
2021-03-30 11:17:49 +02:00
[pr75]: https://github.com/teloxide/teloxide-core/pull/75
2021-03-30 11:31:44 +02:00
[pr77]: https://github.com/teloxide/teloxide-core/pull/77
2021-06-18 12:28:47 +02:00
[pr76]: https://github.com/teloxide/teloxide-core/pull/76
2021-04-27 11:03:43 +02:00
[pr80]: https://github.com/teloxide/teloxide-core/pull/80
2021-04-28 10:24:14 +02:00
[pr84]: https://github.com/teloxide/teloxide-core/pull/84
2021-05-04 15:56:27 +02:00
[pr86]: https://github.com/teloxide/teloxide-core/pull/86
2021-05-12 10:51:03 +02:00
[pr90]: https://github.com/teloxide/teloxide-core/pull/90
2021-07-03 21:34:31 +02:00
[pr96]: https://github.com/teloxide/teloxide-core/pull/96
2021-07-04 14:46:12 +02:00
[pr99]: https://github.com/teloxide/teloxide-core/pull/99
2021-03-30 11:17:49 +02:00
2021-03-28 23:44:42 +02:00
### Changed
2022-08-04 16:22:00 +02:00
- `Message::url` now returns links to messages in private groups too ([#80][pr80])
2021-03-28 23:44:42 +02:00
- Refactor `ChatMember` methods ([#74][pr74])
2021-06-30 19:30:13 +02:00
- impl `Deref<Target = ChatMemberKind>` to make `ChatMemberKind` 's methods callable directly on `ChatMember`
2021-03-28 23:44:42 +02:00
- Add `ChatMemberKind::is_{creator,administrator,member,restricted,left,kicked}` which check `kind` along with `is_privileged` and `is_in_chat` which combine some of the above.
2021-05-04 15:56:27 +02:00
- Refactor privilege getters
- Rename `ChatAction::{RecordAudio => RecordVoice, UploadAudio => UploadVoice}` ([#86][pr86])
2021-07-03 22:35:13 +02:00
- Use `url::Url` for urls, use `chrono::DateTime<Utc>` for dates ([#97][pr97])
2021-03-28 23:44:42 +02:00
[pr74]: https://github.com/teloxide/teloxide-core/pull/74
2021-07-03 22:35:13 +02:00
[pr97]: https://github.com/teloxide/teloxide-core/pull/97
2021-03-28 23:44:42 +02:00
2021-03-26 23:14:10 +01:00
### Fixed
2021-06-19 11:21:50 +02:00
- telegram_response: fix issue `retry_after` and `migrate_to_chat_id` handling ([#94][pr94])
2022-08-04 16:22:00 +02:00
- Type of `PublicChatSupergroup::slow_mode_delay` field: `Option<i32>` => `Option<u32>` ([#80][pr80])
- Add missing `Chat::message_auto_delete_time` field ([#80][pr80])
2021-04-22 16:29:27 +02:00
- Output types of `LeaveChat` `PinChatMessage` , `SetChatDescription` , `SetChatPhoto` `SetChatTitle` , `UnpinAllChatMessages` and `UnpinChatMessage` : `String` => `True` ([#79][pr79])
2021-03-29 12:47:34 +02:00
- `SendChatAction` output type `Message` => `True` ([#75][pr75])
2021-03-28 13:02:10 +02:00
- `GetChatAdministrators` output type `ChatMember` => `Vec<ChatMember>` ([#73][pr73])
2021-03-26 23:14:10 +01:00
- `reqwest` dependency bringing `native-tls` in even when `rustls` was selected ([#71][pr71])
2021-03-29 09:20:03 +02:00
- Type of `{Restricted,Kicked}::until_date` fields: `i32` => `i64` ([#74][pr74])
2021-07-04 16:35:36 +02:00
- Type of `PhotoSize::{width,height}` fields: `i32` => `u32` ([#100][pr100])
2021-03-26 23:14:10 +01:00
[pr71]: https://github.com/teloxide/teloxide-core/pull/71
2021-03-28 13:02:10 +02:00
[pr73]: https://github.com/teloxide/teloxide-core/pull/73
2021-03-29 12:47:34 +02:00
[pr75]: https://github.com/teloxide/teloxide-core/pull/75
2021-04-22 16:29:27 +02:00
[pr79]: https://github.com/teloxide/teloxide-core/pull/79
2021-06-19 11:21:50 +02:00
[pr94]: https://github.com/teloxide/teloxide-core/pull/94
2021-07-04 16:35:36 +02:00
[pr100]: https://github.com/teloxide/teloxide-core/pull/100
2021-03-26 23:14:10 +01:00
2021-08-31 17:36:20 +02:00
## 0.2.2 - 2020-03-22
2021-03-22 08:48:56 +01:00
### Fixed
- Typo: `ReplyMarkup::{keyboad => keyboard}` ([#69][pr69])
- Note: method with the old name was deprecated and hidden from docs
2021-03-22 09:05:00 +01:00
[pr69]: https://github.com/teloxide/teloxide-core/pull/69
2021-08-31 17:36:20 +02:00
## 0.2.1 - 2020-03-19
2021-03-19 10:27:32 +01:00
2022-08-04 16:22:00 +02:00
### Fixed
Fix: types fields privacy (make fields of some types public)
The typos were found with `grep`:
```text
; grep -r -P "^ \w{2,}: .+, *$" ./src/types/*
./src/types/dice.rs: emoji: DiceEmoji,
./src/types/dice.rs: value: i32,
./src/types/keyboard_button.rs: contact: Option<True>,
./src/types/keyboard_button.rs: location: Option<True>,
./src/types/keyboard_button.rs: poll: Option<KeyboardButtonPollType>,
./src/types/message.rs: message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged,
./src/types/passport_element_error.rs: message: String,
./src/types/passport_element_error.rs: kind: PassportElementErrorKind,
./src/types/sticker_set.rs: thumb: Option<PhotoSize>,
```
`src/types/keyboard_button.rs` can be ignored since in just contains private
helper structure.
Fields made public:
- `Dice::{emoji, value}`
- `MessageMessageAutoDeleteTimerChanged::message_auto_delete_timer_changed`
- `PassportElementError::{message, kind}`
- `StickerSet::thumb`
2021-03-19 10:20:26 +01:00
- Types fields privacy (make fields of some types public) ([#68][pr68])
- `Dice::{emoji, value}`
- `MessageMessageAutoDeleteTimerChanged::message_auto_delete_timer_changed`
- `PassportElementError::{message, kind}`
- `StickerSet::thumb`
[pr68]: https://github.com/teloxide/teloxide-core/pull/68
2021-08-31 17:36:20 +02:00
## 0.2.0 - 2020-03-16
2021-03-16 13:36:46 +01:00
2021-03-14 20:51:01 +01:00
### Changed
2021-03-16 13:11:30 +01:00
- Refactor `ReplyMarkup` ([#pr65][pr65]) (**BC**)
- Rename `ReplyMarkup::{InlineKeyboardMarkup => InlineKeyboard, ReplyKeyboardMarkup => Keyboard, ReplyKeyboardRemove => KeyboardRemove}`
2024-02-13 20:36:21 +01:00
- Add `inline_kb` , `keyboad` , `kb_remove` and `force_reply` `ReplyMarkup` constructors
2021-03-16 13:11:30 +01:00
- Rename `ReplyKeyboardMarkup` => `KeyboardMarkup`
- Rename `ReplyKeyboardRemove` => `KeyboardRemove`
- Remove useless generic param from `ReplyKeyboardMarkup::new` and `InlineKeyboardMarkup::new`
- Change parameters order in `ReplyKeyboardMarkup::append_to_row` and `InlineKeyboardMarkup::append_to_row`
2021-03-15 21:43:42 +01:00
- Support telegram bot API version 5.1 (see it's [changelog ](https://core.telegram.org/bots/api#march-9-2021 )) ([#pr63][pr63]) (**BC**)
2021-03-14 20:51:01 +01:00
- Support telegram bot API version 5.0 (see it's [changelog ](https://core.telegram.org/bots/api#november-4-2020 )) ([#pr62][pr62]) (**BC**)
[pr62]: https://github.com/teloxide/teloxide-core/pull/62
2021-03-15 21:43:42 +01:00
[pr63]: https://github.com/teloxide/teloxide-core/pull/63
2021-03-17 20:56:33 +01:00
[pr65]: https://github.com/teloxide/teloxide-core/pull/65
2021-03-14 20:51:01 +01:00
2021-02-26 23:07:57 +01:00
### Added
2024-02-13 20:36:21 +01:00
- `GetUpdatesFaultTolerant` - fault tolerant version of `GetUpdates` ([#58][pr58]) (**BC**)
2021-02-28 17:32:50 +01:00
- Derive `Clone` for `AutoSend` .
2021-02-26 23:07:57 +01:00
[pr58]: https://github.com/teloxide/teloxide-core/pull/58
2021-02-22 06:47:50 +01:00
### Fixed
2021-03-16 13:11:30 +01:00
- Make `MediaContact::contact` public ([#pr64][pr64])
2021-03-05 22:39:19 +01:00
- `set_webhook` signature (make `allowed_updates` optional) ([#59][pr59])
2021-02-22 09:30:13 +01:00
- Fix typos in payloads ([#57][pr57]):
- `get_updates` : `offset` `i64` -> `i32`
- `send_location` : make `live_period` optional
2021-02-22 06:47:50 +01:00
- `send_contact` signature (`phone_number` and `first_name` `f64` => `String` ) ([#56][pr56])
[pr56]: https://github.com/teloxide/teloxide-core/pull/56
2021-02-22 09:30:13 +01:00
[pr57]: https://github.com/teloxide/teloxide-core/pull/57
2021-03-05 22:39:19 +01:00
[pr59]: https://github.com/teloxide/teloxide-core/pull/59
2021-03-16 13:11:30 +01:00
[pr64]: https://github.com/teloxide/teloxide-core/pull/64
2021-02-17 14:04:04 +01:00
2021-03-17 20:56:33 +01:00
### Removed
- `Message::text_owned` ([#pr62][pr62]) (**BC**)
2021-02-27 13:52:11 +01:00
### Changed
2022-08-04 16:22:00 +02:00
- `NonStrictVec` -> `SemiparsedVec` .
2021-02-27 13:52:11 +01:00
2021-08-31 17:36:20 +02:00
## 0.1.1 - 2020-02-17
2021-02-17 14:04:04 +01:00
### Fixed
- Remove `dbg!` call from internals ([#53][pr53])
[pr53]: https://github.com/teloxide/teloxide-core/pull/53
2021-08-31 17:36:20 +02:00
## 0.1.0 - 2020-02-17
2021-02-17 14:04:04 +01:00
2020-08-12 18:39:40 +02:00
### Added
2021-02-16 15:10:02 +01:00
- `#[non_exhaustive]` on `InputFile` since we may want to add new ways to send files in the future ([#49][pr49])
2021-02-16 14:55:27 +01:00
- `MultipartPayload` for future proofing ([#49][pr49])
2021-02-14 22:28:52 +01:00
- Support for `rustls` ([#24][pr24])
- `#[must_use]` attr to payloads implemented by macro ([#22][pr22])
- forward-to-deref `Requester` impls ([#39][pr39])
- `Bot::{set_,}api_url` methods ([#26][pr26], [#35][pr35])
2020-10-21 18:45:03 +02:00
- `payloads` module
- `RequesterExt` trait which is implemented for all `Requester` s and allows easily wrapping them in adaptors
2021-02-14 22:28:52 +01:00
- `adaptors` module ([#14][pr14])
- `throttle` , `cache_me` , `auto_send` and `full` crate features
2021-02-16 16:29:29 +01:00
- Request throttling - opt-in feature represented by `Throttle` bot adapter which allows automatically checking telegram limits ([#10][pr10], [#46][pr46], [#50][pr50])
2020-10-21 18:45:03 +02:00
- Request auto sending - ability to `.await` requests without need to call `.send()` (opt-in feature represented by `AutoSend` bot adapter, [#8][pr8])
- `get_me` caching (opt-in feature represented by `CacheMe` bot adapter)
2021-02-14 22:28:52 +01:00
- `Requester` trait which represents bot-clients ([#7][pr7], [#12][pr12], [#27][pr27])
2020-10-21 18:45:03 +02:00
- `{Json,Multipart}Request` the `Bot` requests types ([#6][pr6])
- `Output<T>` alias to `<<T as HasPayload>::Payload as Payload>::Output`
- `Payload` , `HasPayload` and `Request` traits which represent different parts of the request ([#5][pr5])
2021-02-14 22:28:52 +01:00
- `GetUpdatesNonStrict` 'telegram' method, that behaves just like `GetUpdates` but doesn't [#2][pr2]
2022-08-04 16:22:00 +02:00
fail if one of updates fails to be deserialized
2020-08-12 18:39:40 +02:00
- Move core code here from the [`teloxide`] main repo, for older changes see it's [`CHANGELOG.md`].
- Following modules were moved:
- `bot`
- `requests` [except `requests::respond` function]
- `types`
- `errors`
2022-08-04 16:22:00 +02:00
- `net` [private]
2020-08-12 18:39:40 +02:00
- `client_from_env` was moved from `teloxide::utils` to crate root of `teloxide-core`
2022-08-04 16:22:00 +02:00
- To simplify `GetUpdates` request it was changed to simply return `Vec<Update>`
2020-08-12 18:39:40 +02:00
(instead of `Vec<Result<Update, (Value, serde_json::Error)>>` )
2020-08-16 10:06:50 +02:00
2021-02-14 22:28:52 +01:00
[pr2]: https://github.com/teloxide/teloxide-core/pull/2
2020-10-21 18:45:03 +02:00
[pr5]: https://github.com/teloxide/teloxide-core/pull/5
[pr6]: https://github.com/teloxide/teloxide-core/pull/6
[pr7]: https://github.com/teloxide/teloxide-core/pull/7
[pr8]: https://github.com/teloxide/teloxide-core/pull/8
[pr10]: https://github.com/teloxide/teloxide-core/pull/10
2021-02-17 14:04:04 +01:00
[pr12]: https://github.com/teloxide/teloxide-core/pull/12
[pr14]: https://github.com/teloxide/teloxide-core/pull/14
2021-02-14 22:28:52 +01:00
[pr22]: https://github.com/teloxide/teloxide-core/pull/22
[pr24]: https://github.com/teloxide/teloxide-core/pull/24
[pr26]: https://github.com/teloxide/teloxide-core/pull/26
[pr27]: https://github.com/teloxide/teloxide-core/pull/27
[pr35]: https://github.com/teloxide/teloxide-core/pull/35
[pr39]: https://github.com/teloxide/teloxide-core/pull/39
[pr46]: https://github.com/teloxide/teloxide-core/pull/46
2021-02-16 14:55:27 +01:00
[pr49]: https://github.com/teloxide/teloxide-core/pull/49
2021-02-16 16:29:29 +01:00
[pr50]: https://github.com/teloxide/teloxide-core/pull/50
2020-10-21 18:45:03 +02:00
2020-08-16 10:06:50 +02:00
### Changed
2021-02-14 22:28:52 +01:00
- Cleanup setters in `types::*` (remove most of them) ([#44][pr44])
- Refactor `KeyboardButtonPollType` ([#44][pr44])
- Replace `Into<Vec<_>>` by `IntoIterator<Item = _>` in function arguments ([#44][pr44])
- Update dependencies (including tokio 1.0) ([#37][pr37])
- Refactor file downloading ([#30][pr30]):
- Make `net` module public
- Move `Bot::download_file{,_stream}` methods to a new `Download` trait
- Impl `Download` for all bot adaptors & the `Bot` itself
2022-08-04 16:22:00 +02:00
- Change return type of `download_file_stream` — return ` Stream<Result<Bytes>>``, instead of ` Future< Result < Stream < Result < Bytes > >>>``
2021-02-14 22:28:52 +01:00
- Add `api_url` param to standalone versions of `download_file{,_stream}`
- Make `net::{TELEGRAM_API_URL, download_file{,_stream}}` pub
- Refactor `Bot` ([#29][pr29]):
- Move default parse mode to an adaptor (`DefaultParseMode`)
2024-02-13 20:36:21 +01:00
- Remove bot builder (it's not useful anymore, since parse_mode is moved away)
2021-02-14 22:28:52 +01:00
- Undeprecate bot constructors (`Bot::{new, with_client, from_env_with_client}`)
- Rename `StickerType` => `InputSticker` , `{CreateNewStickerSet,AddStickerToSet}::sticker_type}` => `sticker` ([#23][pr23], [#43][pr43])
2020-11-04 14:00:40 +01:00
- Use `_: IntoIterator<Item = T>` bound instead of `_: Into<Vec<T>>` in telegram methods which accept collections ([#21][pr21])
- Make `MessageDice::dice` pub ([#20][pr20])
2020-10-21 18:45:03 +02:00
- Merge `ApiErrorKind` and `KnownApiErrorKind` into `ApiError` ([#13][pr13])
- Refactor ChatMember ([#9][pr9])
- Replace a bunch of `Option<_>` fields with `ChatMemberKind`
- Remove setters (users are not expected to create this struct)
- Add getters
2021-02-14 22:28:52 +01:00
- Changed internal mechanism of sending multipart requests ([#1][pr1])
2020-08-16 10:06:50 +02:00
- Added `RequestError::Io(io::Error)` to wrap I/O error those can happen while sending files to telegram
2021-02-14 22:28:52 +01:00
- Make all fields of all methods `pub` ([#3][pr3])
2020-08-16 10:06:50 +02:00
2021-02-14 22:28:52 +01:00
[pr1]: https://github.com/teloxide/teloxide-core/pull/1
[pr3]: https://github.com/teloxide/teloxide-core/pull/3
2020-10-21 18:45:03 +02:00
[pr9]: https://github.com/teloxide/teloxide-core/pull/9
[pr13]: https://github.com/teloxide/teloxide-core/pull/13
2020-11-04 14:00:40 +01:00
[pr20]: https://github.com/teloxide/teloxide-core/pull/20
[pr21]: https://github.com/teloxide/teloxide-core/pull/21
[pr23]: https://github.com/teloxide/teloxide-core/pull/23
2021-02-14 22:28:52 +01:00
[pr29]: https://github.com/teloxide/teloxide-core/pull/29
[pr30]: https://github.com/teloxide/teloxide-core/pull/30
[pr37]: https://github.com/teloxide/teloxide-core/pull/37
[pr43]: https://github.com/teloxide/teloxide-core/pull/43
2020-10-21 18:45:03 +02:00
2020-08-16 10:06:50 +02:00
### Removed
2024-02-13 20:36:21 +01:00
- `unstable-stream` feature (now `Bot::download_file_stream` is accessible by default)
2020-10-21 18:45:03 +02:00
- old `Request` trait
2020-08-16 10:06:50 +02:00
- `RequestWithFile` , now multipart requests use `Request`
2021-02-14 22:28:52 +01:00
- Remove all `#[non_exhaustive]` annotations ([#4][pr4])
- Remove `MessageEntity::text_from` because it's wrong ([#44][pr44])
[pr4]: https://github.com/teloxide/teloxide-core/pull/4
[pr44]: https://github.com/teloxide/teloxide-core/pull/44
2020-08-12 18:39:40 +02:00
[`teloxide`]: https://github.com/teloxide/teloxide
2022-08-04 16:22:00 +02:00
[`changelog.md`]: https://github.com/teloxide/teloxide/blob/master/CHANGELOG.md