-
Notifications
You must be signed in to change notification settings - Fork 6
Migrate to 0.15.0 #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use teloxide off master
The constructor is named `start` instead of `new` since will be slow
I don't think this is needed anymore since there should only be one bot instance
Nightly fmt
Expose some types
It's the batch version of deleteMessage that does not return errors for messages that were not found. Docs: https://core.telegram.org/bots/api#deletemessages
Implement deleteMessages
Add MockMessageNewChatMembers
According to the Telegram Bot API docs, the cases of the forward origins are as follows: * MessageOriginChannel: The message was originally sent to a channel chat. * MessageOriginChat: The message was originally sent on behalf of a chat to a group chat. * MessageOriginUser: The message was originally sent by a known user. * MessageOriginHiddenUser: The message was originally sent by an unknown user. Testing with the actual bot API, I do get users, not the chat, for messages forwarded from a supergroup. MessageOriginHiddenUser is determined by the user's settings, which are not exposed to the bot API.
This is not documented properly in Telegram's API docs, but it's the go-to way to remove the inline keyboard from a message.
Make editMessageText delete reply markup to match Telegram's behavior
Fix forward origin
* 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.
Add support for UpdateKind::EditedMessage
Editing message text to the same value is an easy mistake to make, so I would like to test my code against it. I would also like to receive the error properly as an ApiError enum variant, so this commit introduces a way for teloxide_tests actions to return standard error values of Telegram Bot API that teloxide can actually parse. In the future, other usages of check_if_message_exists and ErrorBadRequest should also be replaced with ApiErrors where possible.
Make `edit_message_text` return `ApiError::MessageNotModified`
Added mocking of update poll
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.