From fde2c79f4c2f657b9795e875bf2636370cca3f62 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 11 Jul 2022 01:43:04 +0600 Subject: [PATCH] extract force_reply field into constant --- .../src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt | 1 + .../kotlin/dev/inmo/tgbotapi/types/buttons/ReplyForce.kt | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 33fa728067..345512153b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -415,6 +415,7 @@ const val mediaField = "media" const val disableEditMessageField = "disable_edit_message" const val scoreField = "score" const val forceField = "force" +const val forceReplyField = "force_reply" const val regularPollType = "regular" const val quizPollType = "quiz" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/ReplyForce.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/ReplyForce.kt index a536d06ec9..24a2ee2443 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/ReplyForce.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/ReplyForce.kt @@ -1,7 +1,6 @@ package dev.inmo.tgbotapi.types.buttons -import dev.inmo.tgbotapi.types.inputFieldPlaceholderField -import dev.inmo.tgbotapi.types.inputFieldPlaceholderLimit +import dev.inmo.tgbotapi.types.* import kotlinx.serialization.* @Serializable @@ -10,7 +9,7 @@ data class ReplyForce( @SerialName(inputFieldPlaceholderField) val inputFieldPlaceholder: String? = null ) : KeyboardMarkup { - @SerialName("force_reply") + @SerialName(forceReplyField) @Required val forceReply: Boolean = true