From bed60720d33a4c01148579064399a94b6247e425 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 20 Apr 2019 13:14:49 +0800 Subject: [PATCH] InlineKeyboardMarkup using field as serial name for keyboard --- .../com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt | 1 + .../TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt index 9122be4efe..055e4b0cd0 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt @@ -64,6 +64,7 @@ const val inlineMessageIdField = "inline_message_id" const val callbackDataField = "callback_data" const val callbackQueryIdField = "callback_query_id" const val inlineQueryIdField = "inline_query_id" +const val inlineKeyboardField = "inline_keyboard" const val showAlertField = "show_alert" const val cachedTimeField = "cached_time" const val foursquareIdField = "foursquare_id" diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt index 1e3185ccd5..a5ff3ee61e 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardMarkup.kt @@ -1,11 +1,12 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.buttons import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons.InlineKeyboardButton +import com.github.insanusmokrassar.TelegramBotAPI.types.inlineKeyboardField import kotlinx.serialization.* import kotlinx.serialization.internal.ArrayListSerializer @Serializable data class InlineKeyboardMarkup( - @SerialName("inline_keyboard") + @SerialName(inlineKeyboardField) val keyboard: Matrix ) : KeyboardMarkup