1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-27 02:57:13 +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 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]
* which will be used by telegram to send encrypted messages
* @param scope Scope which will be used for
@ -35,8 +36,8 @@ import java.util.concurrent.TimeUnit
suspend fun RequestsExecutor.setWebhook(
url: String,
port: Int,
listenAddress: String,
engineFactory: ApplicationEngineFactory<*, *>,
listenAddress: String = "/",
certificate: InputFile? = null,
privateKeyConfig: WebhookPrivateKeyConfig? = null,
scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()),
@ -149,8 +150,8 @@ suspend fun RequestsExecutor.setWebhook(
) = setWebhook(
url,
port,
"/",
engineFactory,
"/",
certificate,
privateKeyConfig,
scope,
@ -168,12 +169,12 @@ suspend fun RequestsExecutor.setWebhook(
privateKeyConfig: WebhookPrivateKeyConfig? = null,
scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()),
maxAllowedConnections: Int? = null,
listenAddress: String = ""
listenAddress: String = "/"
): Job = setWebhook(
url,
port,
listenAddress,
engineFactory,
listenAddress,
certificate,
privateKeyConfig,
scope,