1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-29 21:48:43 +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 { ): T? = (request as? DownloadFile) ?.let {
val fullUrl = urlsKeeper.createFileLinkUrl(it.filePath) val fullUrl = urlsKeeper.createFileLinkUrl(it.filePath)
return safely { safely {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
client.get<ByteArray>(fullUrl) as T // always ByteArray client.get<ByteArray>(fullUrl) as T // always ByteArray
} }