mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 12:08:43 +00:00
a little reorder of arguments in setWebhook
This commit is contained in:
parent
ef7e94ba68
commit
0066e814b3
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user