From 1c66d1e2fced47d7e1ecb8097bc1d9c3928a3c3f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 21 Apr 2023 21:47:14 +0600 Subject: [PATCH] add support of WriteAccessAllowed#webAppName --- .../commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt | 1 + .../types/message/ChatEvents/forum/WriteAccessAllowed.kt | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 b64318597c..2e69e85555 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 @@ -605,4 +605,5 @@ const val temporaryRegistrationField = "temporary_registration" const val buttonTextField = "button_text" const val webAppField = "web_app" +const val webAppNameField = "web_app_name" const val menuButtonField = "menu_button" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed.kt index 6cd4ad5a67..2d6a630f5b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed.kt @@ -1,7 +1,12 @@ package dev.inmo.tgbotapi.types.message.ChatEvents.forum import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ForumEvent +import dev.inmo.tgbotapi.types.webAppNameField +import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -object WriteAccessAllowed : ForumEvent +data class WriteAccessAllowed( + @SerialName(webAppNameField) + val webAppName: String? = null +) : ForumEvent