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 02cdbf293c..4ca6a283b2 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 @@ -464,6 +464,7 @@ const val userField = "user" const val dateField = "date" const val reactionsField = "reactions" const val reactionField = "reaction" +const val availableReactionsField = "available_reactions" const val isBigField = "is_big" const val oldReactionField = "old_reaction" const val newReactionField = "new_reaction" 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 91d502f931..017e3be087 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.chat import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer +import dev.inmo.tgbotapi.types.reactions.Reaction import dev.inmo.tgbotapi.utils.RiskFeature import korlibs.time.DateTime import kotlinx.serialization.SerialName @@ -32,7 +33,9 @@ data class ExtendedChannelChatImpl( @SerialName(linkedChatIdField) override val linkedGroupChatId: IdChatIdentifier? = null, @SerialName(hasHiddenMembersField) - override val membersHidden: Boolean = false + override val membersHidden: Boolean = false, + @SerialName(availableReactionsField) + override val availableReactions: List? = null ) : ExtendedChannelChat @Serializable @@ -54,7 +57,9 @@ data class ExtendedGroupChatImpl( @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class) override val pinnedMessage: Message? = null, @SerialName(hasHiddenMembersField) - override val membersHidden: Boolean = false + override val membersHidden: Boolean = false, + @SerialName(availableReactionsField) + override val availableReactions: List? = null ) : ExtendedGroupChat @Serializable @@ -125,7 +130,9 @@ data class ExtendedSupergroupChatImpl( @SerialName(hasAggressiveAntiSpamEnabledField) override val isAggressiveAntiSpamEnabled: Boolean = false, @SerialName(hasHiddenMembersField) - override val membersHidden: Boolean = false + override val membersHidden: Boolean = false, + @SerialName(availableReactionsField) + override val availableReactions: List? = null ) : ExtendedSupergroupChat @Serializable @@ -167,7 +174,9 @@ data class ExtendedForumChatImpl( @SerialName(hasAggressiveAntiSpamEnabledField) override val isAggressiveAntiSpamEnabled: Boolean = false, @SerialName(hasHiddenMembersField) - override val membersHidden: Boolean = false + override val membersHidden: Boolean = false, + @SerialName(availableReactionsField) + override val availableReactions: List? = null ) : ExtendedForumChat @Serializable 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 09ac9d6f4f..36092957be 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.chat import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer +import dev.inmo.tgbotapi.types.reactions.Reaction import korlibs.time.DateTime import kotlinx.serialization.Serializable @@ -34,6 +35,7 @@ sealed interface ExtendedPublicChat : ExtendedChat, PublicChat { @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class) val pinnedMessage: Message? val membersHidden: Boolean + val availableReactions: List? } @Serializable(ExtendedChatSerializer.Companion::class)