teloxide/CHANGELOG.md
2021-03-29 00:44:42 +03:00

9.5 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[unreleased]

Changed

  • Refactor ChatMember methods (#74)
    • impl Deref<Target = ChatMemberKind> to make ChatMemberKind's methods callible directly on ChatMember
    • 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.
    • Refactor privilege getters

Fixed

  • GetChatAdministrators output type ChatMember => Vec<ChatMember> (#73)
  • reqwest dependency bringing native-tls in even when rustls was selected (#71)

[0.2.2] - 2020-03-22

Fixed

  • Typo: ReplyMarkup::{keyboad => keyboard} (#69)
    • Note: method with the old name was deprecated and hidden from docs

[0.2.1] - 2020-03-19

Fixed

  • Types fields privacy (make fields of some types public) (#68)
    • Dice::{emoji, value}
    • MessageMessageAutoDeleteTimerChanged::message_auto_delete_timer_changed
    • PassportElementError::{message, kind}
    • StickerSet::thumb

[0.2.0] - 2020-03-16

Changed

  • Refactor ReplyMarkup (#pr65) (BC)
    • Rename ReplyMarkup::{InlineKeyboardMarkup => InlineKeyboard, ReplyKeyboardMarkup => Keyboard, ReplyKeyboardRemove => KeyboardRemove}
    • Add inline_kb, keyboad, kb_remove and force_reply ReplyMarkup consructors
    • 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
  • Support telegram bot API version 5.1 (see it's changelog) (#pr63) (BC)
  • Support telegram bot API version 5.0 (see it's changelog) (#pr62) (BC)

Added

  • GetUpdatesFaultTolerant - fault toletant version of GetUpdates (#58) (BC)
  • Derive Clone for AutoSend.

Fixed

  • Make MediaContact::contact public (#pr64)
  • set_webhook signature (make allowed_updates optional) (#59)
  • Fix typos in payloads (#57):
    • get_updates: offset i64 -> i32
    • send_location: make live_period optional
  • send_contact signature (phone_number and first_name f64 => String) (#56)

Removed

  • Message::text_owned (#pr62) (BC)

Changed

  • NonStrictVec -> SemiparsedVec.

[0.1.1] - 2020-02-17

Fixed

  • Remove dbg! call from internals (#53)

[0.1.0] - 2020-02-17

Added

  • #[non_exhaustive] on InputFile since we may want to add new ways to send files in the future (#49)
  • MultipartPayload for future proofing (#49)
  • Support for rustls (#24)
  • #[must_use] attr to payloads implemented by macro (#22)
  • forward-to-deref Requester impls (#39)
  • Bot::{set_,}api_url methods (#26, #35)
  • payloads module
  • RequesterExt trait which is implemented for all Requesters and allows easily wrapping them in adaptors
  • adaptors module (#14)
    • throttle, cache_me, auto_send and full crate features
    • Request throttling - opt-in feature represented by Throttle bot adapter which allows automatically checking telegram limits (#10, #46, #50)
    • Request auto sending - ability to .await requests without need to call .send() (opt-in feature represented by AutoSend bot adapter, #8)
    • get_me caching (opt-in feature represented by CacheMe bot adapter)
  • Requester trait which represents bot-clients (#7, #12, #27)
  • {Json,Multipart}Request the Bot requests types (#6)
  • Output<T> alias to <<T as HasPayload>::Payload as Payload>::Output
  • Payload, HasPayload and Request traits which represent different parts of the request (#5)
  • GetUpdatesNonStrict 'telegram' method, that behaves just like GetUpdates but doesn't #2 fail if one of updates fails to be deserialized
  • 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
      • net [private]
    • client_from_env was moved from teloxide::utils to crate root of teloxide-core
    • To simplify GetUpdates request it was changed to simply return Vec<Update> (instead of Vec<Result<Update, (Value, serde_json::Error)>>)

Changed

  • Cleanup setters in types::* (remove most of them) (#44)
  • Refactor KeyboardButtonPollType (#44)
  • Replace Into<Vec<_>> by IntoIterator<Item = _> in function arguments (#44)
  • Update dependencies (including tokio 1.0) (#37)
  • Refactor file downloading (#30):
    • Make net module public
    • Move Bot::download_file{,_stream} methods to a new Download trait
      • Impl Download for all bot adaptors & the Bot itself
    • Change return type of download_file_stream — return Stream<Result<Bytes>>``, instead of Future<Result<Stream<Result>>>``
    • Add api_url param to standalone versions of download_file{,_stream}
    • Make net::{TELEGRAM_API_URL, download_file{,_stream}} pub
  • Refactor Bot (#29):
    • Move default parse mode to an adaptor (DefaultParseMode)
    • Remove bot builder (it's not usefull anymore, since parse_mode is moved away)
    • Undeprecate bot constructors (Bot::{new, with_client, from_env_with_client})
  • Rename StickerType => InputSticker, {CreateNewStickerSet,AddStickerToSet}::sticker_type} => sticker (#23, #43)
  • Use _: IntoIterator<Item = T> bound instead of _: Into<Vec<T>> in telegram methods which accept collections (#21)
  • Make MessageDice::dice pub (#20)
  • Merge ApiErrorKind and KnownApiErrorKind into ApiError (#13)
  • Refactor ChatMember (#9)
    • Replace a bunch of Option<_> fields with ChatMemberKind
    • Remove setters (users are not expected to create this struct)
    • Add getters
  • Changed internal mechanism of sending multipart requests (#1)
  • Added RequestError::Io(io::Error) to wrap I/O error those can happen while sending files to telegram
  • Make all fields of all methods pub (#3)

Removed

  • unstable-stream feature (now Bot::download_file_stream is accesable by default)
  • old Request trait
  • RequestWithFile, now multipart requests use Request
  • Remove all #[non_exhaustive] annotations (#4)
  • Remove MessageEntity::text_from because it's wrong (#44)