mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 12:08:43 +00:00
small improvement of DownloadFileRequestCallFactory
This commit is contained in:
parent
149ecf175b
commit
9a14932511
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user