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 a25b7b1572..2ab970a366 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 @@ -11,9 +11,9 @@ import io.ktor.client.HttpClient import kotlinx.serialization.json.Json @RiskFeature -fun createTelegramBotDefaultKtorCallRequestsFactories() = listOf( - SimpleRequestCallFactory(), - MultipartRequestCallFactory(), +fun createTelegramBotDefaultKtorCallRequestsFactories(logger: KSLog? = null) = listOf( + SimpleRequestCallFactory(logger), + MultipartRequestCallFactory(logger), DownloadFileRequestCallFactory, DownloadFileChannelRequestCallFactory ) 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 50fa0d3bd3..fd7a0bf237 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 @@ -38,7 +38,7 @@ class DefaultKtorRequestsExecutor internal constructor( private val callsFactories: List = callsFactories.run { if (!excludeDefaultFactories) { logger.v { "Installing default factories" } - this + createTelegramBotDefaultKtorCallRequestsFactories() + this + createTelegramBotDefaultKtorCallRequestsFactories(logger) } else { logger.v { "Default factories will not be installed" } this