mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
add support of business info in chats
This commit is contained in:
parent
cb7bb01671
commit
8de584b292
@ -587,3 +587,6 @@ const val wasRefundedField = "was_refunded"
|
||||
const val isManualField = "is_manual"
|
||||
|
||||
const val businessConnectionIdField = "business_connection_id"
|
||||
const val businessIntroField = "business_intro"
|
||||
const val businessLocationField = "business_location"
|
||||
const val businessOpeningHoursField = "business_opening_hours"
|
||||
|
@ -1,6 +1,9 @@
|
||||
package dev.inmo.tgbotapi.types.chat
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessIntro
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessLocation
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessOpeningHours
|
||||
import dev.inmo.tgbotapi.types.colors.ColorId
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
||||
@ -124,6 +127,12 @@ data class ExtendedPrivateChatImpl(
|
||||
override val backgroundCustomEmojiId: CustomEmojiId? = null,
|
||||
@SerialName(profileBackgroundCustomEmojiIdField)
|
||||
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null,
|
||||
@SerialName(businessIntroField)
|
||||
override val businessIntro: BusinessIntro? = null,
|
||||
@SerialName(businessLocationField)
|
||||
override val businessLocation: BusinessLocation? = null,
|
||||
@SerialName(businessOpeningHoursField)
|
||||
override val businessOpeningHours: BusinessOpeningHours? = null,
|
||||
) : ExtendedPrivateChat
|
||||
|
||||
typealias ExtendedUser = ExtendedPrivateChatImpl
|
||||
|
@ -1,6 +1,9 @@
|
||||
package dev.inmo.tgbotapi.types.chat
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessIntro
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessLocation
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessOpeningHours
|
||||
import dev.inmo.tgbotapi.types.colors.ColorId
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
@ -39,6 +42,10 @@ sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername, Ex
|
||||
val hasPrivateForwards: Boolean
|
||||
val hasRestrictedVoiceAndVideoMessages: Boolean
|
||||
|
||||
val businessIntro: BusinessIntro?
|
||||
val businessLocation: BusinessLocation?
|
||||
val businessOpeningHours: BusinessOpeningHours?
|
||||
|
||||
val allowCreateUserIdLink: Boolean
|
||||
get() = hasPrivateForwards
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user