1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +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 -> ): Any? = (request as? MultipartRequest) ?.let { castedRequest ->
MultiPartFormDataContent( MultiPartFormDataContent(
formData { formData {
val params = castedRequest.paramsJson.mapWithCommonValues() val params = castedRequest.paramsJson.mapWithCommonValues() - castedRequest.mediaMap.keys
for ((key, value) in castedRequest.mediaMap + params) { for ((key, value) in castedRequest.mediaMap + params) {
when (value) { when (value) {
is MultipartFile -> appendInput( is MultipartFile -> appendInput(

View File

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