1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +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 optionIdsField = "option_ids"
const val ipAddressField = "ip_address" const val ipAddressField = "ip_address"
const val linkedChatIdField = "linked_chat_id" const val linkedChatIdField = "linked_chat_id"
const val hasHiddenMembersField = "has_hidden_members"
const val joinToSendMessagesField = "join_to_send_messages" const val joinToSendMessagesField = "join_to_send_messages"
const val joinByRequestField = "join_by_request" const val joinByRequestField = "join_by_request"
const val horizontalAccuracyField = "horizontal_accuracy" const val horizontalAccuracyField = "horizontal_accuracy"

View File

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

View File

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