mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Merge branch 'master' into chat_member_methods
This commit is contained in:
commit
ccdcda68d4
5 changed files with 13 additions and 2 deletions
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- `impl Clone` for {`CacheMe`, `DefaultParseMode`, `Throttle`} ([#75][pr75])
|
||||
|
||||
[pr75]: https://github.com/teloxide/teloxide-core/pull/75
|
||||
|
||||
### Changed
|
||||
|
||||
- Refactor `ChatMember` methods ([#74][pr74])
|
||||
|
@ -18,12 +24,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
- `SendChatAction` output type `Message` => `True` ([#75][pr75])
|
||||
- `GetChatAdministrators` output type `ChatMember` => `Vec<ChatMember>` ([#73][pr73])
|
||||
- `reqwest` dependency bringing `native-tls` in even when `rustls` was selected ([#71][pr71])
|
||||
- Type of `{Restricted,Kicked}::until_date` fields: `i32` => `i64` ([#74][pr74])
|
||||
|
||||
[pr71]: https://github.com/teloxide/teloxide-core/pull/71
|
||||
[pr73]: https://github.com/teloxide/teloxide-core/pull/73
|
||||
[pr75]: https://github.com/teloxide/teloxide-core/pull/75
|
||||
|
||||
## [0.2.2] - 2020-03-22
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ use crate::{
|
|||
///
|
||||
/// Bot's user is hardly ever changed, so sometimes it's reasonable to cache
|
||||
/// response from `get_me` method.
|
||||
#[derive(Clone)]
|
||||
pub struct CacheMe<B> {
|
||||
bot: B,
|
||||
me: Arc<OnceCell<Me>>,
|
||||
|
|
|
@ -6,6 +6,7 @@ use crate::{
|
|||
|
||||
/// Default parse mode adaptor, see
|
||||
/// [`RequesterExt::parse_mode`](crate::requests::RequesterExt::parse_mode).
|
||||
#[derive(Clone)]
|
||||
pub struct DefaultParseMode<B> {
|
||||
bot: B,
|
||||
mode: ParseMode,
|
||||
|
|
|
@ -146,6 +146,7 @@ impl Default for Limits {
|
|||
///
|
||||
/// As such, we encourage not to use `ChatId::ChannelUsername(u)` with this bot
|
||||
/// wrapper.
|
||||
#[derive(Clone)]
|
||||
pub struct Throttle<B> {
|
||||
bot: B,
|
||||
// `RequestLock` allows to unlock requests (allowing them to be sent).
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{ChatAction, ChatId, Message};
|
||||
use crate::types::{ChatAction, ChatId, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
|
||||
|
@ -19,7 +19,7 @@ impl_payload! {
|
|||
///
|
||||
/// [ImageBot]: https://t.me/imagebot
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub SendChatAction (SendChatActionSetters) => Message {
|
||||
pub SendChatAction (SendChatActionSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: ChatId [into],
|
||||
|
|
Loading…
Add table
Reference in a new issue