From f4a731940e87ed5f469ec9681bd444e08d756f9f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 23 Jan 2020 20:40:56 +0600 Subject: [PATCH] QuizPoll#correctOptionId now is nullable --- .../insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt index c0e198528e..dbab464bcd 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/polls/Poll.kt @@ -60,8 +60,11 @@ data class QuizPoll( override val options: List, @SerialName(totalVoterCountField) override val votesCount: Int, + /** + * Nullable due to documentation (https://core.telegram.org/bots/api#poll) + */ @SerialName(correctOptionIdField) - val correctOptionId: Int, + val correctOptionId: Int? = null, @SerialName(isClosedField) override val isClosed: Boolean = false, @SerialName(isAnonymousField)