1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-10-26 09:40:09 +00:00

Merge branch 'master' into 29.0.0

This commit is contained in:
2025-09-23 18:21:13 +06:00
16 changed files with 79 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.extensions.utils.extensions
import dev.inmo.tgbotapi.types.files.PathedFile
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
import dev.inmo.tgbotapi.utils.defaultKtorEngine
import io.ktor.client.HttpClient
import io.ktor.client.request.get
import io.ktor.client.statement.readBytes
@@ -19,5 +20,5 @@ suspend fun HttpClient.loadFile(
suspend fun PathedFile.download(
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
client: HttpClient = HttpClient()
client: HttpClient = HttpClient(defaultKtorEngine)
) = client.loadFile(telegramAPIUrlsKeeper, this)