diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendMediaGroup.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendMediaGroup.kt index e3e2774435..f13de99995 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendMediaGroup.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/SendMediaGroup.kt @@ -5,8 +5,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.SendMessageRequest import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.* import com.github.insanusmokrassar.TelegramBotAPI.types.* -import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.MediaGroupMemberInputMedia -import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.ThumbedInputMedia +import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.* import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage import com.github.insanusmokrassar.TelegramBotAPI.utils.toJsonWithoutNulls import kotlinx.serialization.* @@ -70,13 +69,11 @@ data class SendMediaGroupData internal constructor( ) : Data>, SendMessageRequest> { - // TODO:: fix this nail when kotlin serialisation will support - @ImplicitReflectionSerializer @SerialName(mediaField) private val convertedMedia: String get() = jsonArray { media.forEach { - +it.toJsonWithoutNulls() + +it.toJsonWithoutNulls(MediaGroupMemberInputMediaSerializer) } }.toString()