1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

InputMedia#media fix (version 0.23.2)

This commit is contained in:
InsanusMokrassar 2020-02-14 12:06:43 +06:00
parent 8bbfa2ee24
commit a17ae07e50
5 changed files with 17 additions and 22 deletions

View File

@ -51,6 +51,10 @@
* `toInputFile` extensions now will return more exact types
* Now it is possible to send broadcast channels size for `FlowsUpdatesFilter`
### 0.23.2
* Fixes in `InputMedia` - `media` field was not included to serialization
## 0.22.0
* **`KtorCallFactory` must return `HttpStatement` instead of `HttpClientCall`**

View File

@ -17,7 +17,7 @@ plugins {
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
}
project.version = "0.23.1"
project.version = "0.23.2"
project.group = "com.github.insanusmokrassar"
apply from: "publish.gradle"

View File

@ -22,11 +22,8 @@ data class InputMediaAnimation(
override val type: String = "animation"
@SerialName(mediaField)
val media: String
get() = file.let {
when (it) {
is FileId -> it.fileId
is MultipartFile -> it.fileId.toInputMediaFileAttachmentName()
}
val media: String = when (file) {
is FileId -> file.fileId
is MultipartFile -> file.fileId.toInputMediaFileAttachmentName()
}
}

View File

@ -23,11 +23,8 @@ data class InputMediaAudio(
override val type: String = "audio"
@SerialName(mediaField)
val media: String
get() = file.let {
when (it) {
is FileId -> it.fileId
is MultipartFile -> it.fileId.toInputMediaFileAttachmentName()
}
val media: String = when (file) {
is FileId -> file.fileId
is MultipartFile -> file.fileId.toInputMediaFileAttachmentName()
}
}

View File

@ -19,11 +19,8 @@ data class InputMediaDocument(
override val type: String = "document"
@SerialName(mediaField)
val media: String
get() = file.let {
when (it) {
is FileId -> it.fileId
is MultipartFile -> it.fileId.toInputMediaFileAttachmentName()
}
val media: String = when (file) {
is FileId -> file.fileId
is MultipartFile -> file.fileId.toInputMediaFileAttachmentName()
}
}