Merge pull request #181 from teloxide/poll_fix

Fix sending quiz polls
This commit is contained in:
Waffle Maybe 2022-02-17 14:18:15 +03:00 committed by GitHub
commit 016763cf8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## unreleased
### Fixed
- Serialization of `SendPoll::type_` (it's now possible to send quiz polls) ([#181][pr181])
[pr181]: https://github.com/teloxide/teloxide-core/pull/181
### Added
- `Payload::timeout_hint` method to properly handle long running requests like `GetUpdates` ([#180][pr180])

View file

@ -29,6 +29,7 @@ impl_payload! {
/// True, if the poll needs to be anonymous, defaults to True
pub is_anonymous: bool,
/// Poll type, “quiz” or “regular”, defaults to “regular”
#[serde(rename = "type")]
pub type_: PollType,
/// True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False
pub allows_multiple_answers: bool,