mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Merge pull request #172 from teloxide/typed_ip_address
Make `WebhookInfo::ip_address` typed
This commit is contained in:
commit
58259d6d45
2 changed files with 5 additions and 1 deletions
|
@ -47,12 +47,14 @@ 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])
|
||||
|
||||
[pr115]: https://github.com/teloxide/teloxide-core/pull/115
|
||||
[pr125]: https://github.com/teloxide/teloxide-core/pull/125
|
||||
[pr134]: https://github.com/teloxide/teloxide-core/pull/134
|
||||
[pr150]: https://github.com/teloxide/teloxide-core/pull/150
|
||||
[pr157]: https://github.com/teloxide/teloxide-core/pull/157
|
||||
[pr172]: https://github.com/teloxide/teloxide-core/pull/172
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use std::net::IpAddr;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
@ -19,7 +21,7 @@ pub struct WebhookInfo {
|
|||
pub pending_update_count: u32,
|
||||
|
||||
/// Currently used webhook IP address.
|
||||
pub ip_address: Option<String>,
|
||||
pub ip_address: Option<IpAddr>,
|
||||
|
||||
/// Time of the most recent error that happened when trying to
|
||||
/// deliver an update via webhook.
|
||||
|
|
Loading…
Add table
Reference in a new issue