diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 45a271e500..6cba69e80f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -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" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt index c8af805302..55517b3031 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt @@ -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 diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt index bdb3e4c2f9..208b7ee986 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt @@ -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 }