Skip to content

Conversation

@IlyaBizyaev
Copy link
Contributor

  • A wrapper is introduced that changes a Message's into_update() behavior. Having edit_date set seems to be a requirement for correct parsing.
  • MockBot is updated to support UpdateKind::EditedMessage.
  • Renamed the old Messages::edit_message to edit_message_field for clarity.
  • I also fixed a couple of copy-paste errors along the way.

@IlyaBizyaev IlyaBizyaev force-pushed the feat/edited-message branch 2 times, most recently from a7b08d2 to ca19fa1 Compare February 2, 2025 12:19
@IlyaBizyaev
Copy link
Contributor Author

Or maybe, instead of introducing EditedMessage, I can just change Message::into_update to use UpdateKind::EditedMessage if it has an .edit_date. I guess UpdateKind::Message(<message with edit_date>) is not very useful :)

@LasterAlex
Copy link
Owner

Ill look into this later, sorry for not responding to the the pr, i am quite busy rn, dont even have time to review :(

Copy link
Owner

@LasterAlex LasterAlex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! Thanks! Just some nitpicks
After resolving them and the merge conflict I'll merge

@LasterAlex
Copy link
Owner

I can just change Message::into_update to use UpdateKind::EditedMessage if it has an .edit_date

I like the explicit approach, so this is probably not the best idea, it will create strange to understand code

* A wrapper is introduced that changes a Message's into_update() behavior.
  Having edit_date set seems to be a requirement for correct parsing.
* MockBot is updated to support UpdateKind::EditedMessage.
* Renamed the old Messages::edit_message to edit_message_field for clarity.
* I also fixed a couple of copy-paste errors along the way.
@LasterAlex LasterAlex self-requested a review February 28, 2025 19:20
Copy link
Owner

@LasterAlex LasterAlex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good! Thanks!

@LasterAlex LasterAlex merged commit ecd5d9c into LasterAlex:latest-teloxide Feb 28, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants