From 057d902883ef450649e0be17edb967a49c3b9113 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 4 Mar 2019 10:49:37 +0800 Subject: [PATCH] add SetWebhook factory which can be used without certificate file --- .../TelegramBotAPI/requests/webhook/SetWebhook.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt index 852018d5ca..e7e8500499 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt @@ -27,6 +27,17 @@ fun SetWebhook( } } +fun SetWebhook( + url: String, + maxAllowedConnections: Int? = null, + allowedUpdates: List? = null +) : Request = SetWebhook( + url, + null, + maxAllowedConnections, + allowedUpdates +) + @Serializable data class SetWebhook internal constructor( @SerialName(urlField)