mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
CommonUser#addedToAttachmentMenu
This commit is contained in:
parent
04db76831f
commit
8dfaca7648
@ -4,6 +4,7 @@
|
||||
|
||||
* Add support of functionality for `WebApp`s from [Bot API 6.1](https://core.telegram.org/bots/api-changelog#june-20-2022)
|
||||
* Add support of functionality for premium feature from [Bot API 6.1](https://core.telegram.org/bots/api-changelog#june-20-2022)
|
||||
* Add support of `addedToAttachmentMenu` in `CommonUser` from [Bot API 6.1](https://core.telegram.org/bots/api-changelog#june-20-2022)
|
||||
|
||||
## 2.0.3
|
||||
|
||||
|
@ -117,6 +117,7 @@ const val isBotField = "is_bot"
|
||||
const val firstNameField = "first_name"
|
||||
const val lastNameField = "last_name"
|
||||
const val languageCodeField = "language_code"
|
||||
const val addedToAttachmentMenuField = "added_to_attachment_menu"
|
||||
const val isPremiumField = "is_premium"
|
||||
const val hasPrivateForwardsField = "has_private_forwards"
|
||||
const val canJoinGroupsField = "can_join_groups"
|
||||
|
@ -37,6 +37,11 @@ sealed interface PremiumChat : Chat {
|
||||
val isPremium: Boolean
|
||||
}
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
sealed interface AbleToAddInAttachmentMenuChat : Chat {
|
||||
val addedToAttachmentMenu: Boolean
|
||||
}
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
sealed interface Chat {
|
||||
val id: ChatId
|
||||
|
@ -82,8 +82,10 @@ data class CommonUser(
|
||||
@Serializable(IetfLanguageCodeSerializer::class)
|
||||
override val ietfLanguageCode: IetfLanguageCode? = null,
|
||||
@SerialName(isPremiumField)
|
||||
override val isPremium: Boolean = false
|
||||
) : User(), WithOptionalLanguageCode, PremiumChat {
|
||||
override val isPremium: Boolean = false,
|
||||
@SerialName(addedToAttachmentMenuField)
|
||||
override val addedToAttachmentMenu: Boolean = false
|
||||
) : User(), WithOptionalLanguageCode, PremiumChat, AbleToAddInAttachmentMenuChat {
|
||||
constructor(
|
||||
id: UserId,
|
||||
firstName: String,
|
||||
|
Loading…
Reference in New Issue
Block a user