diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardButton.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardButton.kt index 6313693989..0ca7bc9aa7 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardButton.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardButton.kt @@ -7,5 +7,5 @@ import kotlinx.serialization.Serializable @Serializable data class PreparedKeyboardButton( @SerialName(idField) - val id: PreparedKeyboardId + val id: PreparedKeyboardButtonId ) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardId.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardButtonId.kt similarity index 80% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardId.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardButtonId.kt index b45897b32f..0e2f4aa33e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardId.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/PreparedKeyboardButtonId.kt @@ -5,6 +5,6 @@ import kotlin.jvm.JvmInline @Serializable @JvmInline -value class PreparedKeyboardId( +value class PreparedKeyboardButtonId( val string: String ) \ No newline at end of file diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/WebApp.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/WebApp.kt index 1a942b0649..ca8ec135ed 100644 --- a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/WebApp.kt +++ b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/WebApp.kt @@ -4,6 +4,7 @@ package dev.inmo.tgbotapi.webapps import dev.inmo.tgbotapi.types.CustomEmojiId import dev.inmo.tgbotapi.types.PreparedMessageId +import dev.inmo.tgbotapi.types.buttons.PreparedKeyboardButtonId import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper import dev.inmo.tgbotapi.webapps.accelerometer.Accelerometer import dev.inmo.tgbotapi.webapps.biometric.BiometricManager @@ -149,6 +150,8 @@ external class WebApp { fun hideKeyboard() + fun requestChat(id: PreparedKeyboardButtonId, callback: ((Boolean) -> Unit)? = definedExternally) + // Start of generated part @JsName("onEvent")