From ff2d1615dabcd6afc99a59a723ba3cdb3de4bdf8 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 16 Apr 2022 23:58:24 +0600 Subject: [PATCH] replace TODO for pipelineStepsHolder with default realization --- .../kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt | 2 +- .../dev/inmo/tgbotapi/bot/ktor/KtorPipelineStepsHolder.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt index c05d98fc14..c168c982c5 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt @@ -58,7 +58,7 @@ class KtorRequestsExecutor( excludeDefaultFactories: Boolean = false, private val requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter(), private val jsonFormatter: Json = nonstrictJsonFormat, - private val pipelineStepsHolder: KtorPipelineStepsHolder = TODO() + private val pipelineStepsHolder: KtorPipelineStepsHolder = KtorPipelineStepsHolder ) : BaseRequestsExecutor(telegramAPIUrlsKeeper) { private val callsFactories: List = callsFactories.run { if (!excludeDefaultFactories) { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/KtorPipelineStepsHolder.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/KtorPipelineStepsHolder.kt index b1e8eb9db5..725a2a8bc6 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/KtorPipelineStepsHolder.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/KtorPipelineStepsHolder.kt @@ -70,4 +70,6 @@ interface KtorPipelineStepsHolder { request: Request, callsFactories: List ): T = result.getOrThrow() + + companion object : KtorPipelineStepsHolder }