1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-23 00:57:13 +00:00

update version of library

This commit is contained in:
InsanusMokrassar 2022-10-30 19:47:23 +06:00
parent e753db0e71
commit 7471da4ff0
2 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class MultipartRequestCallFactory : AbstractRequestCallFactory() {
): Any? = (request as? MultipartRequest) ?.let { castedRequest ->
MultiPartFormDataContent(
formData {
val params = castedRequest.paramsJson.mapWithCommonValues()
val params = castedRequest.paramsJson.mapWithCommonValues() - castedRequest.mediaMap.keys
for ((key, value) in castedRequest.mediaMap + params) {
when (value) {
is MultipartFile -> appendInput(

View File

@ -13,6 +13,7 @@ import kotlinx.serialization.json.JsonObject
data class SetChatPhoto (
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@Transient
val photo: MultipartFile = throw IllegalArgumentException("Unfortunately, this type of objects can't be parsed automatically")
): ChatRequest, MultipartRequest<Boolean> {
override fun method(): String = "setChatPhoto"