1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 00:03:48 +00:00

add support of has_hidden_members

This commit is contained in:
InsanusMokrassar 2022-12-30 20:55:47 +06:00
parent b064becb8a
commit 5a30a07554
3 changed files with 14 additions and 4 deletions

View File

@ -243,6 +243,7 @@ const val customTitleField = "custom_title"
const val optionIdsField = "option_ids"
const val ipAddressField = "ip_address"
const val linkedChatIdField = "linked_chat_id"
const val hasHiddenMembersField = "has_hidden_members"
const val joinToSendMessagesField = "join_to_send_messages"
const val joinByRequestField = "join_by_request"
const val horizontalAccuracyField = "horizontal_accuracy"

View File

@ -27,7 +27,9 @@ data class ExtendedChannelChatImpl(
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
override val pinnedMessage: Message? = null,
@SerialName(linkedChatIdField)
override val linkedGroupChatId: IdChatIdentifier? = null
override val linkedGroupChatId: IdChatIdentifier? = null,
@SerialName(hasHiddenMembersField)
override val membersHidden: Boolean = false
) : ExtendedChannelChat
@Serializable
@ -46,7 +48,9 @@ data class ExtendedGroupChatImpl(
override val inviteLink: String? = null,
@SerialName(pinnedMessageField)
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
override val pinnedMessage: Message? = null
override val pinnedMessage: Message? = null,
@SerialName(hasHiddenMembersField)
override val membersHidden: Boolean = false
) : ExtendedGroupChat
@Serializable
@ -109,7 +113,9 @@ data class ExtendedSupergroupChatImpl(
@SerialName(joinToSendMessagesField)
override val requiresJoinForMessaging: Boolean = false,
@SerialName(joinByRequestField)
override val requireAdminApproveToJoin: Boolean = false
override val requireAdminApproveToJoin: Boolean = false,
@SerialName(hasHiddenMembersField)
override val membersHidden: Boolean = false
) : ExtendedSupergroupChat
@Serializable
@ -146,7 +152,9 @@ data class ExtendedForumChatImpl(
@SerialName(joinToSendMessagesField)
override val requiresJoinForMessaging: Boolean = false,
@SerialName(joinByRequestField)
override val requireAdminApproveToJoin: Boolean = false
override val requireAdminApproveToJoin: Boolean = false,
@SerialName(hasHiddenMembersField)
override val membersHidden: Boolean = false
) : ExtendedForumChat
@Serializable

View File

@ -31,6 +31,7 @@ sealed interface ExtendedPublicChat : ExtendedChat, PublicChat {
val inviteLink: String?
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
val pinnedMessage: Message?
val membersHidden: Boolean
}
@Serializable(ExtendedChatSerializer::class)