mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +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
|
* `toInputFile` extensions now will return more exact types
|
||||||
* Now it is possible to send broadcast channels size for `FlowsUpdatesFilter`
|
* 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
|
## 0.22.0
|
||||||
|
|
||||||
* **`KtorCallFactory` must return `HttpStatement` instead of `HttpClientCall`**
|
* **`KtorCallFactory` must return `HttpStatement` instead of `HttpClientCall`**
|
||||||
|
@ -17,7 +17,7 @@ plugins {
|
|||||||
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
|
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
project.version = "0.23.1"
|
project.version = "0.23.2"
|
||||||
project.group = "com.github.insanusmokrassar"
|
project.group = "com.github.insanusmokrassar"
|
||||||
|
|
||||||
apply from: "publish.gradle"
|
apply from: "publish.gradle"
|
||||||
|
@ -22,11 +22,8 @@ data class InputMediaAnimation(
|
|||||||
override val type: String = "animation"
|
override val type: String = "animation"
|
||||||
|
|
||||||
@SerialName(mediaField)
|
@SerialName(mediaField)
|
||||||
val media: String
|
val media: String = when (file) {
|
||||||
get() = file.let {
|
is FileId -> file.fileId
|
||||||
when (it) {
|
is MultipartFile -> file.fileId.toInputMediaFileAttachmentName()
|
||||||
is FileId -> it.fileId
|
|
||||||
is MultipartFile -> it.fileId.toInputMediaFileAttachmentName()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,11 +23,8 @@ data class InputMediaAudio(
|
|||||||
override val type: String = "audio"
|
override val type: String = "audio"
|
||||||
|
|
||||||
@SerialName(mediaField)
|
@SerialName(mediaField)
|
||||||
val media: String
|
val media: String = when (file) {
|
||||||
get() = file.let {
|
is FileId -> file.fileId
|
||||||
when (it) {
|
is MultipartFile -> file.fileId.toInputMediaFileAttachmentName()
|
||||||
is FileId -> it.fileId
|
|
||||||
is MultipartFile -> it.fileId.toInputMediaFileAttachmentName()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,8 @@ data class InputMediaDocument(
|
|||||||
override val type: String = "document"
|
override val type: String = "document"
|
||||||
|
|
||||||
@SerialName(mediaField)
|
@SerialName(mediaField)
|
||||||
val media: String
|
val media: String = when (file) {
|
||||||
get() = file.let {
|
is FileId -> file.fileId
|
||||||
when (it) {
|
is MultipartFile -> file.fileId.toInputMediaFileAttachmentName()
|
||||||
is FileId -> it.fileId
|
|
||||||
is MultipartFile -> it.fileId.toInputMediaFileAttachmentName()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user