From 1cb0e096be9eb6c6b5613d0534cc06f290eb095b Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 13 Apr 2020 11:20:39 +0600 Subject: [PATCH] fixes in InlineKeyboardButtonSerializer --- .../buttons/InlineKeyboardButtons/InlineKeyboardButton.kt | 3 ++- .../InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt index 875655bc1f..0e5c18508e 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt @@ -4,6 +4,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.games.CallbackGame import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.JsonObject @Serializable(InlineKeyboardButtonSerializer::class) @@ -14,7 +15,7 @@ sealed class InlineKeyboardButton { @Serializable data class UnknownInlineKeyboardButton internal constructor( override val text: String, - val rawData: JsonObject + val rawData: JsonElement ) : InlineKeyboardButton() @Serializable diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt index 722c2fd07a..832fcb9900 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButtonSerializer.kt @@ -25,11 +25,11 @@ internal object InlineKeyboardButtonSerializer : KSerializer