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

add support of has_visible_history field

This commit is contained in:
InsanusMokrassar 2024-01-07 15:16:33 +06:00
parent e66537ee32
commit 14756fd6e8
3 changed files with 11 additions and 1 deletions

View File

@ -236,6 +236,7 @@ const val accentColorIdField = "accent_color_id"
const val profileAccentColorIdField = "profile_accent_color_id"
const val backgroundCustomEmojiIdField = "background_custom_emoji_id"
const val profileBackgroundCustomEmojiIdField = "profile_background_custom_emoji_id"
const val hasVisibleHistoryField = "has_visible_history"
const val iconCustomEmojiIdField = "icon_custom_emoji_id"
const val canJoinGroupsField = "can_join_groups"
const val canReadAllGroupMessagesField = "can_read_all_group_messages"

View File

@ -49,6 +49,8 @@ data class ExtendedChannelChatImpl(
override val backgroundCustomEmojiId: CustomEmojiId? = null,
@SerialName(profileBackgroundCustomEmojiIdField)
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null,
@SerialName(hasVisibleHistoryField)
override val newMembersSeeHistory: Boolean = false
) : ExtendedChannelChat
@Serializable
@ -85,6 +87,8 @@ data class ExtendedGroupChatImpl(
override val backgroundCustomEmojiId: CustomEmojiId? = null,
@SerialName(profileBackgroundCustomEmojiIdField)
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null,
@SerialName(hasVisibleHistoryField)
override val newMembersSeeHistory: Boolean = false,
) : ExtendedGroupChat
@Serializable
@ -178,6 +182,8 @@ data class ExtendedSupergroupChatImpl(
override val backgroundCustomEmojiId: CustomEmojiId? = null,
@SerialName(profileBackgroundCustomEmojiIdField)
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null,
@SerialName(hasVisibleHistoryField)
override val newMembersSeeHistory: Boolean = false,
) : ExtendedSupergroupChat
@Serializable
@ -234,6 +240,8 @@ data class ExtendedForumChatImpl(
override val backgroundCustomEmojiId: CustomEmojiId? = null,
@SerialName(profileBackgroundCustomEmojiIdField)
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null,
@SerialName(hasVisibleHistoryField)
override val newMembersSeeHistory: Boolean = false,
) : ExtendedForumChat
@Serializable
@ -279,5 +287,5 @@ data class UnknownExtendedChat(
@SerialName(backgroundCustomEmojiIdField)
override val backgroundCustomEmojiId: CustomEmojiId? = null
@SerialName(profileBackgroundCustomEmojiIdField)
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null,\
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null
}

View File

@ -50,6 +50,7 @@ sealed interface ExtendedPublicChat : ExtendedChat, PublicChat, ExtendedNonBotCh
val pinnedMessage: Message?
val membersHidden: Boolean
val availableReactions: List<Reaction>?
val newMembersSeeHistory: Boolean
}
@Serializable(ExtendedChatSerializer.Companion::class)