mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
small refactoring of KtorRequestsExecutor
This commit is contained in:
parent
bf8096ece2
commit
84eb2fac7c
@ -76,7 +76,7 @@ class KtorRequestsExecutor(
|
||||
}
|
||||
val responseObject = jsonFormatter.extractResult(content)
|
||||
|
||||
val result = responseObject.result ?.let {
|
||||
(responseObject.result ?.let {
|
||||
jsonFormatter.fromJson(request.resultDeserializer(), it)
|
||||
} ?: responseObject.parameters ?.let {
|
||||
val error = it.error
|
||||
@ -92,8 +92,7 @@ class KtorRequestsExecutor(
|
||||
content,
|
||||
"Can't get result object from $content"
|
||||
)
|
||||
}
|
||||
result
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user