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 1c9bfeb9f6..8a3d8b8d85 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 @@ -246,6 +246,7 @@ const val linkedChatIdField = "linked_chat_id" const val hasHiddenMembersField = "has_hidden_members" const val joinToSendMessagesField = "join_to_send_messages" const val joinByRequestField = "join_by_request" +const val hasAggressiveAntiSpamEnabledField = "has_aggressive_anti_spam_enabled" const val horizontalAccuracyField = "horizontal_accuracy" const val revokeMessagesField = "revoke_messages" const val messageAutoDeleteTimeField = "message_auto_delete_time" 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 fe176d6862..fbc6f19f3d 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 @@ -114,6 +114,8 @@ data class ExtendedSupergroupChatImpl( override val requiresJoinForMessaging: Boolean = false, @SerialName(joinByRequestField) override val requireAdminApproveToJoin: Boolean = false, + @SerialName(hasAggressiveAntiSpamEnabledField) + override val isAggressiveAntiSpamEnabled: Boolean = false, @SerialName(hasHiddenMembersField) override val membersHidden: Boolean = false ) : ExtendedSupergroupChat @@ -153,6 +155,8 @@ data class ExtendedForumChatImpl( override val requiresJoinForMessaging: Boolean = false, @SerialName(joinByRequestField) override val requireAdminApproveToJoin: Boolean = false, + @SerialName(hasAggressiveAntiSpamEnabledField) + override val isAggressiveAntiSpamEnabled: Boolean = false, @SerialName(hasHiddenMembersField) override val membersHidden: Boolean = false ) : ExtendedForumChat 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 319e7dd363..734b8bacc3 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 @@ -51,6 +51,11 @@ sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, Ext * This field represents field "join_by_request" from API */ val requireAdminApproveToJoin: Boolean + + /** + * This field represents field "has_aggressive_anti_spam_enabled" from API + */ + val isAggressiveAntiSpamEnabled: Boolean } @Serializable(ExtendedChatSerializer::class)