mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +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 `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 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
|
## 2.0.3
|
||||||
|
|
||||||
|
@ -117,6 +117,7 @@ const val isBotField = "is_bot"
|
|||||||
const val firstNameField = "first_name"
|
const val firstNameField = "first_name"
|
||||||
const val lastNameField = "last_name"
|
const val lastNameField = "last_name"
|
||||||
const val languageCodeField = "language_code"
|
const val languageCodeField = "language_code"
|
||||||
|
const val addedToAttachmentMenuField = "added_to_attachment_menu"
|
||||||
const val isPremiumField = "is_premium"
|
const val isPremiumField = "is_premium"
|
||||||
const val hasPrivateForwardsField = "has_private_forwards"
|
const val hasPrivateForwardsField = "has_private_forwards"
|
||||||
const val canJoinGroupsField = "can_join_groups"
|
const val canJoinGroupsField = "can_join_groups"
|
||||||
|
@ -37,6 +37,11 @@ sealed interface PremiumChat : Chat {
|
|||||||
val isPremium: Boolean
|
val isPremium: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Serializable(PreviewChatSerializer::class)
|
||||||
|
sealed interface AbleToAddInAttachmentMenuChat : Chat {
|
||||||
|
val addedToAttachmentMenu: Boolean
|
||||||
|
}
|
||||||
|
|
||||||
@Serializable(PreviewChatSerializer::class)
|
@Serializable(PreviewChatSerializer::class)
|
||||||
sealed interface Chat {
|
sealed interface Chat {
|
||||||
val id: ChatId
|
val id: ChatId
|
||||||
|
@ -82,8 +82,10 @@ data class CommonUser(
|
|||||||
@Serializable(IetfLanguageCodeSerializer::class)
|
@Serializable(IetfLanguageCodeSerializer::class)
|
||||||
override val ietfLanguageCode: IetfLanguageCode? = null,
|
override val ietfLanguageCode: IetfLanguageCode? = null,
|
||||||
@SerialName(isPremiumField)
|
@SerialName(isPremiumField)
|
||||||
override val isPremium: Boolean = false
|
override val isPremium: Boolean = false,
|
||||||
) : User(), WithOptionalLanguageCode, PremiumChat {
|
@SerialName(addedToAttachmentMenuField)
|
||||||
|
override val addedToAttachmentMenu: Boolean = false
|
||||||
|
) : User(), WithOptionalLanguageCode, PremiumChat, AbleToAddInAttachmentMenuChat {
|
||||||
constructor(
|
constructor(
|
||||||
id: UserId,
|
id: UserId,
|
||||||
firstName: String,
|
firstName: String,
|
||||||
|
Loading…
Reference in New Issue
Block a user