1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-23 00:57:13 +00:00

add support of has_restricted_voice_and_video_messages

This commit is contained in:
InsanusMokrassar 2022-08-14 21:56:25 +06:00
parent d4fe4e09fc
commit e10caa3171
3 changed files with 5 additions and 1 deletions

View File

@ -164,6 +164,7 @@ 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 hasRestrictedVoiceAndVideoMessagesField = "has_restricted_voice_and_video_messages"
const val canJoinGroupsField = "can_join_groups"
const val canReadAllGroupMessagesField = "can_read_all_group_messages"
const val supportInlineQueriesField = "supports_inline_queries"

View File

@ -62,7 +62,9 @@ data class ExtendedPrivateChatImpl(
@SerialName(bioField)
override val bio: String = "",
@SerialName(hasPrivateForwardsField)
override val hasPrivateForwards: Boolean = false
override val hasPrivateForwards: Boolean = false,
@SerialName(hasRestrictedVoiceAndVideoMessagesField)
override val hasRestrictedVoiceAndVideoMessages: Boolean
) : ExtendedPrivateChat
typealias ExtendedUser = ExtendedPrivateChatImpl

View File

@ -19,6 +19,7 @@ sealed interface ExtendedGroupChat : GroupChat, ExtendedPublicChat {
sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChat {
val bio: String
val hasPrivateForwards: Boolean
val hasRestrictedVoiceAndVideoMessages: Boolean
val allowCreateUserIdLink: Boolean
get() = hasPrivateForwards