mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
InputMedia#media fix (version 0.23.2)
This commit is contained in:
parent
8bbfa2ee24
commit
a17ae07e50
@ -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`**
|
||||
|
@ -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"
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user