mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 11:43:57 +01:00
Make WebhookInfo::allowed_updates
typed
This commit is contained in:
parent
8556256e89
commit
a36794c5d3
2 changed files with 6 additions and 2 deletions
|
@ -51,7 +51,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- How forwarded messages are represented ([#151][pr151])
|
||||
- `RequestError::InvalidJson` now has a `raw` field with raw json for easier debugability ([#150][pr150])
|
||||
- `ChatPermissions` is now bitflags ([#157][pr157])
|
||||
- Type of `WebhookInfo::ip_address` from `String` to `std::net::IpAddr` ([#172][pr172])
|
||||
- Type of `WebhookInfo::ip_address` from `Option<String>` to `Option<std::net::IpAddr>` ([#172][pr172])
|
||||
- Type of `WebhookInfo::allowed_updates` from `Option<Vec<String>>` to `Option<Vec<AllowedUpdate>>` ([#174][pr174])
|
||||
|
||||
[pr115]: https://github.com/teloxide/teloxide-core/pull/115
|
||||
[pr125]: https://github.com/teloxide/teloxide-core/pull/125
|
||||
|
@ -60,6 +61,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
[pr157]: https://github.com/teloxide/teloxide-core/pull/157
|
||||
[pr167]: https://github.com/teloxide/teloxide-core/pull/167
|
||||
[pr172]: https://github.com/teloxide/teloxide-core/pull/172
|
||||
[pr174]: https://github.com/teloxide/teloxide-core/pull/174
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ use std::net::IpAddr;
|
|||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::types::AllowedUpdate;
|
||||
|
||||
/// Contains information about the current status of a webhook.
|
||||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#webhookinfo).
|
||||
|
@ -38,5 +40,5 @@ pub struct WebhookInfo {
|
|||
|
||||
/// A list of update types the bot is subscribed to. Defaults to all update
|
||||
/// types.
|
||||
pub allowed_updates: Option<Vec<String>>,
|
||||
pub allowed_updates: Option<Vec<AllowedUpdate>>,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue