Add filter_forward_origin

This commit is contained in:
Сырцев Вадим Игоревич 2024-07-31 16:19:29 +03:00 committed by Andrey Brusnik
parent 3029dcdee6
commit ae88d56e0d
No known key found for this signature in database
GPG key ID: D33232F28CFF442C
3 changed files with 5 additions and 4 deletions

View file

@ -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]) - 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]) - `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]) - `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 ### Removed

View file

@ -20,9 +20,9 @@ pub struct ExternalReplyInfo {
#[serde(with = "crate::types::option_msg_id_as_int")] #[serde(with = "crate::types::option_msg_id_as_int")]
pub message_id: Option<MessageId>, pub message_id: Option<MessageId>,
/// Options used for link preview generation for the original message, if it /// 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>, 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)] #[serde(default)]
pub has_media_spoiler: bool, pub has_media_spoiler: bool,
@ -38,7 +38,7 @@ pub enum ExternalReplyInfoKind {
// - `Animation` must be in front of `Document` // - `Animation` must be in front of `Document`
// //
// This is needed so serde doesn't parse `Venue` as `Location` or `Animation` as `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> // See <https://github.com/teloxide/teloxide/issues/481>
Animation(Animation), Animation(Animation),

View file

@ -95,6 +95,7 @@ define_message_ext! {
(filter_migration_from, Message::migrate_from_chat_id), (filter_migration_from, Message::migrate_from_chat_id),
(filter_migration_to, Message::migrate_to_chat_id), (filter_migration_to, Message::migrate_to_chat_id),
(filter_reply_to_message, Message::reply_to_message), (filter_reply_to_message, Message::reply_to_message),
(filter_forward_origin, Message::forward_origin),
// Rest variants of a MessageKind // Rest variants of a MessageKind
(filter_new_chat_members, Message::new_chat_members), (filter_new_chat_members, Message::new_chat_members),
(filter_left_chat_member, Message::left_chat_member), (filter_left_chat_member, Message::left_chat_member),