From f85d4a36e14a9d38d28acb8183e45cdeb87134e7 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 11 Nov 2024 13:14:28 +0600 Subject: [PATCH] fix of #860 --- .../bot/ktor/KtorRequestsExecutorFactories.kt | 16 ++++++++-------- .../bot/ktor/base/DefaultKtorRequestsExecutor.kt | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/KtorRequestsExecutorFactories.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/KtorRequestsExecutorFactories.kt index 768d99fcb6..c3623e8e76 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/KtorRequestsExecutorFactories.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/KtorRequestsExecutorFactories.kt @@ -34,14 +34,14 @@ class KtorRequestsExecutorBuilder( } fun build() = KtorRequestsExecutor( - telegramAPIUrlsKeeper, - client, - callsFactories, - excludeDefaultFactories, - requestsLimiter, - jsonFormatter, - pipelineStepsHolder, - logger + telegramAPIUrlsKeeper = telegramAPIUrlsKeeper, + client = client, + callsFactories = callsFactories, + excludeDefaultFactories = excludeDefaultFactories, + requestsLimiter = requestsLimiter, + jsonFormatter = jsonFormatter, + pipelineStepsHolder = pipelineStepsHolder, + logger = logger ) } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt index bd29dc2ee6..e08f2c3807 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt @@ -32,10 +32,10 @@ class DefaultKtorRequestsExecutor internal constructor( ) : BaseRequestsExecutor(telegramAPIUrlsKeeper) { private val callsFactories: List = callsFactories.run { if (!excludeDefaultFactories) { - logger.v { "Installing default factories" } - this + createTelegramBotDefaultKtorCallRequestsFactories(logger) + this@DefaultKtorRequestsExecutor.logger.v { "Installing default factories" } + this + createTelegramBotDefaultKtorCallRequestsFactories(this@DefaultKtorRequestsExecutor.logger) } else { - logger.v { "Default factories will not be installed" } + this@DefaultKtorRequestsExecutor.logger.v { "Default factories will not be installed" } this } }