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

add support of has_private_forwards

This commit is contained in:
InsanusMokrassar 2021-12-10 12:53:00 +06:00
parent 23f93075a4
commit 0581587adf
3 changed files with 8 additions and 1 deletions

View File

@ -113,6 +113,7 @@ const val isBotField = "is_bot"
const val firstNameField = "first_name"
const val lastNameField = "last_name"
const val languageCodeField = "language_code"
const val hasPrivateForwardsField = "has_private_forwards"
const val canJoinGroupsField = "can_join_groups"
const val canReadAllGroupMessagesField = "can_read_all_group_messages"
const val supportInlineQueriesField = "supports_inline_queries"

View File

@ -7,4 +7,8 @@ import kotlinx.serialization.Serializable
@Serializable(ExtendedChatSerializer::class)
interface ExtendedPrivateChat : PrivateChat, ExtendedChat {
val bio: String
val hasPrivateForwards: Boolean
val allowCreateUserIdLink: Boolean
get() = hasPrivateForwards
}

View File

@ -18,5 +18,7 @@ data class ExtendedPrivateChatImpl(
@SerialName(lastNameField)
override val lastName: String = "",
@SerialName(bioField)
override val bio: String = ""
override val bio: String = "",
@SerialName(hasPrivateForwardsField)
override val hasPrivateForwards: Boolean = false
) : ExtendedPrivateChat