Create the 'webhooks' feature

This commit is contained in:
Temirkhan Myrzamadi 2020-03-30 20:19:20 +06:00
parent 2152e11422
commit 548ea06ad0
2 changed files with 5 additions and 1 deletions

View file

@ -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"

View file

@ -210,6 +210,7 @@ pub fn polling(
.flatten()
}
#[cfg(feature = "webhooks")]
pub async fn webhook<KP, KB, CP, CB>(
url: Url,
addr: SocketAddr,