mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
Revert "try to fix problem with arguments in InputMedia"
This reverts commit c3978f2dab
.
This commit is contained in:
parent
c3978f2dab
commit
046402454f
@ -27,7 +27,8 @@ data class InputMediaPhoto(
|
||||
}
|
||||
|
||||
@Transient
|
||||
override val arguments: Map<String, Any?> = buildArguments(serializer())
|
||||
@Deprecated("Marked as deprecated for removal in future updates", level = DeprecationLevel.ERROR)
|
||||
override val arguments: Map<String, Any?> = error("Unsupported operation")
|
||||
}
|
||||
|
||||
fun PhotoSize.toInputMediaPhoto(
|
||||
|
@ -31,5 +31,6 @@ data class InputMediaVideo(
|
||||
}
|
||||
|
||||
@Transient
|
||||
override val arguments: Map<String, Any?> = buildArguments(serializer())
|
||||
@Deprecated("Marked as deprecated for removal in future updates", level = DeprecationLevel.ERROR)
|
||||
override val arguments: Map<String, Any?> = error("Unsupported operation")
|
||||
}
|
||||
|
@ -1,16 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.properties.Properties
|
||||
|
||||
internal fun <T> T.buildArguments(withSerializer: SerializationStrategy<T>) = Properties.encodeToMap(
|
||||
withSerializer,
|
||||
this
|
||||
)
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.StringFormat
|
||||
|
||||
@Serializable(MediaGroupMemberInputMediaSerializer::class)
|
||||
interface MediaGroupMemberInputMedia : InputMedia, CaptionedOutput {
|
||||
fun serialize(format: StringFormat): String
|
||||
@Deprecated("Marked as deprecated for removal in future updates", level = DeprecationLevel.ERROR)
|
||||
val arguments: Map<String, Any?>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user