1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-26 03:28:10 +00:00

small improvement of DownloadFileRequestCallFactory

This commit is contained in:
InsanusMokrassar 2021-08-10 11:32:22 +06:00
parent 149ecf175b
commit 9a14932511

View File

@ -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<ByteArray>(fullUrl) as T // always ByteArray
}