1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-29 21:48:43 +00:00

a little reorder of arguments in setWebhook

This commit is contained in:
InsanusMokrassar 2020-01-01 14:12:37 +06:00
parent ef7e94ba68
commit 0066e814b3

View File

@ -28,6 +28,7 @@ import java.util.concurrent.TimeUnit
* *
* @param url URL of webhook WITHOUT including of [port] * @param url URL of webhook WITHOUT including of [port]
* @param port port which will be listen by bot * @param port port which will be listen by bot
* @param listenAddress address to listen by bot
* @param certificate [com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile] or [com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId] * @param certificate [com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile] or [com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId]
* which will be used by telegram to send encrypted messages * which will be used by telegram to send encrypted messages
* @param scope Scope which will be used for * @param scope Scope which will be used for
@ -35,8 +36,8 @@ import java.util.concurrent.TimeUnit
suspend fun RequestsExecutor.setWebhook( suspend fun RequestsExecutor.setWebhook(
url: String, url: String,
port: Int, port: Int,
listenAddress: String,
engineFactory: ApplicationEngineFactory<*, *>, engineFactory: ApplicationEngineFactory<*, *>,
listenAddress: String = "/",
certificate: InputFile? = null, certificate: InputFile? = null,
privateKeyConfig: WebhookPrivateKeyConfig? = null, privateKeyConfig: WebhookPrivateKeyConfig? = null,
scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()),
@ -149,8 +150,8 @@ suspend fun RequestsExecutor.setWebhook(
) = setWebhook( ) = setWebhook(
url, url,
port, port,
"/",
engineFactory, engineFactory,
"/",
certificate, certificate,
privateKeyConfig, privateKeyConfig,
scope, scope,
@ -168,12 +169,12 @@ suspend fun RequestsExecutor.setWebhook(
privateKeyConfig: WebhookPrivateKeyConfig? = null, privateKeyConfig: WebhookPrivateKeyConfig? = null,
scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()),
maxAllowedConnections: Int? = null, maxAllowedConnections: Int? = null,
listenAddress: String = "" listenAddress: String = "/"
): Job = setWebhook( ): Job = setWebhook(
url, url,
port, port,
listenAddress,
engineFactory, engineFactory,
listenAddress,
certificate, certificate,
privateKeyConfig, privateKeyConfig,
scope, scope,