diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt index aec803e5f8..bf8e3687d9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileRequestCallFactory.kt @@ -18,7 +18,7 @@ object DownloadFileRequestCallFactory : KtorCallFactory { ): T? = (request as? DownloadFile) ?.let { val fullUrl = urlsKeeper.createFileLinkUrl(it.filePath) - return safely { + safely { @Suppress("UNCHECKED_CAST") client.get(fullUrl) as T // always ByteArray }