diff --git a/CHANGELOG.md b/CHANGELOG.md index e29dd5a7be..8d81011c81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ section * New field `dropPendingUpdates`. It works the same as `drop_pending_updates` in [setWebhook](https://core.telegram.org/bots/api#setwebhook) section + * New field `ExtendedPrivateChat#bio` ## 0.29.4 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 97e8e46d07..1452412f73 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 @@ -247,6 +247,7 @@ const val userField = "user" const val dateField = "date" const val chatField = "chat" const val usernameField = "username" +const val bioField = "bio" const val nameField = "name" const val emailField = "email" const val locationField = "location" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedPrivateChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedPrivateChat.kt index e88ca5fa9f..297c7f3986 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedPrivateChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedPrivateChat.kt @@ -2,4 +2,6 @@ package dev.inmo.tgbotapi.types.chat.abstracts.extended import dev.inmo.tgbotapi.types.chat.abstracts.PrivateChat -interface ExtendedPrivateChat : PrivateChat, ExtendedChat +interface ExtendedPrivateChat : PrivateChat, ExtendedChat { + val bio: String +} diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/extended/ExtendedPrivateChatImpl.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/extended/ExtendedPrivateChatImpl.kt index d507fcfea3..4c1d9702de 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/extended/ExtendedPrivateChatImpl.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/extended/ExtendedPrivateChatImpl.kt @@ -16,5 +16,7 @@ data class ExtendedPrivateChatImpl( @SerialName(firstNameField) override val firstName: String = "", @SerialName(lastNameField) - override val lastName: String = "" + override val lastName: String = "", + @SerialName(bioField) + override val bio: String = "" ) : ExtendedPrivateChat