mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Create the 'webhooks' feature
This commit is contained in:
parent
2152e11422
commit
548ea06ad0
2 changed files with 5 additions and 1 deletions
|
@ -25,6 +25,9 @@ maintenance = { status = "actively-developed" }
|
|||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[features]
|
||||
webhooks = ["warp"]
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.44"
|
||||
serde = { version = "1.0.101", features = ["derive"] }
|
||||
|
@ -48,7 +51,7 @@ either = "1.5.3"
|
|||
|
||||
teloxide-macros = "0.2.1"
|
||||
|
||||
warp = { version = "0.2.2", features = ["tls"] }
|
||||
warp = { version = "0.2.2", features = ["tls"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
smart-default = "0.6.0"
|
||||
|
|
|
@ -210,6 +210,7 @@ pub fn polling(
|
|||
.flatten()
|
||||
}
|
||||
|
||||
#[cfg(feature = "webhooks")]
|
||||
pub async fn webhook<KP, KB, CP, CB>(
|
||||
url: Url,
|
||||
addr: SocketAddr,
|
||||
|
|
Loading…
Add table
Reference in a new issue