Skip to content

Commit

Permalink
Add filter_forward_origin
Browse files Browse the repository at this point in the history
  • Loading branch information
syrtcevvi authored and shdwchn10 committed Aug 15, 2024
1 parent 3029dcd commit ae88d56
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions crates/teloxide-core/src/types/external_reply_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand All @@ -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),
Expand Down
1 change: 1 addition & 0 deletions crates/teloxide/src/dispatching/filter_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit ae88d56

Please sign in to comment.