mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Add filter_forward_origin
This commit is contained in:
parent
3029dcdee6
commit
ae88d56e0d
3 changed files with 5 additions and 4 deletions
|
@ -70,7 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- MSRV (Minimal Supported Rust Version) was bumped from `1.68.0` to `1.70.0` ([PR 996][https://github.com/teloxide/teloxide/pull/996])
|
||||
- `axum` was bumped to `0.7`, along with related libraries used for webhooks ([PR 1093][https://github.com/teloxide/teloxide/pull/1093])
|
||||
- `Polling`'s exponential backoff now results in 64 seconds maximum delay instead of 17 minutes ([PR 1113][https://github.com/teloxide/teloxide/pull/1113])
|
||||
- `filter_forward_from` was removed ([PR 1101](https://github.com/teloxide/teloxide/pull/1101))
|
||||
- `filter_forward_from` was renamed to `filter_forward_origin` and now returns `MessageOrigin` instead of `ForwardFrom` ([PR 1101](https://github.com/teloxide/teloxide/pull/1101))
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ pub struct ExternalReplyInfo {
|
|||
#[serde(with = "crate::types::option_msg_id_as_int")]
|
||||
pub message_id: Option<MessageId>,
|
||||
/// Options used for link preview generation for the original message, if it
|
||||
/// is a text message
|
||||
/// is a text message.
|
||||
pub link_preview_options: Option<LinkPreviewOptions>,
|
||||
/// _true_, if the message media is covered by a spoiler animation
|
||||
/// _true_, if the message media is covered by a spoiler animation.
|
||||
#[serde(default)]
|
||||
pub has_media_spoiler: bool,
|
||||
|
||||
|
@ -38,7 +38,7 @@ pub enum ExternalReplyInfoKind {
|
|||
// - `Animation` must be in front of `Document`
|
||||
//
|
||||
// This is needed so serde doesn't parse `Venue` as `Location` or `Animation` as `Document`
|
||||
// (for backward compatability telegram duplicates some fields)
|
||||
// (for backward compatability telegram duplicates some fields).
|
||||
//
|
||||
// See <https://github.com/teloxide/teloxide/issues/481>
|
||||
Animation(Animation),
|
||||
|
|
|
@ -95,6 +95,7 @@ define_message_ext! {
|
|||
(filter_migration_from, Message::migrate_from_chat_id),
|
||||
(filter_migration_to, Message::migrate_to_chat_id),
|
||||
(filter_reply_to_message, Message::reply_to_message),
|
||||
(filter_forward_origin, Message::forward_origin),
|
||||
// Rest variants of a MessageKind
|
||||
(filter_new_chat_members, Message::new_chat_members),
|
||||
(filter_left_chat_member, Message::left_chat_member),
|
||||
|
|
Loading…
Reference in a new issue