1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

add support of has_aggressive_anti_spam_enabled

This commit is contained in:
InsanusMokrassar 2022-12-30 20:57:39 +06:00
parent 5a30a07554
commit c4659b558f
3 changed files with 10 additions and 0 deletions

View File

@ -246,6 +246,7 @@ const val linkedChatIdField = "linked_chat_id"
const val hasHiddenMembersField = "has_hidden_members" const val hasHiddenMembersField = "has_hidden_members"
const val joinToSendMessagesField = "join_to_send_messages" const val joinToSendMessagesField = "join_to_send_messages"
const val joinByRequestField = "join_by_request" const val joinByRequestField = "join_by_request"
const val hasAggressiveAntiSpamEnabledField = "has_aggressive_anti_spam_enabled"
const val horizontalAccuracyField = "horizontal_accuracy" const val horizontalAccuracyField = "horizontal_accuracy"
const val revokeMessagesField = "revoke_messages" const val revokeMessagesField = "revoke_messages"
const val messageAutoDeleteTimeField = "message_auto_delete_time" const val messageAutoDeleteTimeField = "message_auto_delete_time"

View File

@ -114,6 +114,8 @@ data class ExtendedSupergroupChatImpl(
override val requiresJoinForMessaging: Boolean = false, override val requiresJoinForMessaging: Boolean = false,
@SerialName(joinByRequestField) @SerialName(joinByRequestField)
override val requireAdminApproveToJoin: Boolean = false, override val requireAdminApproveToJoin: Boolean = false,
@SerialName(hasAggressiveAntiSpamEnabledField)
override val isAggressiveAntiSpamEnabled: Boolean = false,
@SerialName(hasHiddenMembersField) @SerialName(hasHiddenMembersField)
override val membersHidden: Boolean = false override val membersHidden: Boolean = false
) : ExtendedSupergroupChat ) : ExtendedSupergroupChat
@ -153,6 +155,8 @@ data class ExtendedForumChatImpl(
override val requiresJoinForMessaging: Boolean = false, override val requiresJoinForMessaging: Boolean = false,
@SerialName(joinByRequestField) @SerialName(joinByRequestField)
override val requireAdminApproveToJoin: Boolean = false, override val requireAdminApproveToJoin: Boolean = false,
@SerialName(hasAggressiveAntiSpamEnabledField)
override val isAggressiveAntiSpamEnabled: Boolean = false,
@SerialName(hasHiddenMembersField) @SerialName(hasHiddenMembersField)
override val membersHidden: Boolean = false override val membersHidden: Boolean = false
) : ExtendedForumChat ) : ExtendedForumChat

View File

@ -51,6 +51,11 @@ sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, Ext
* This field represents field "join_by_request" from API * This field represents field "join_by_request" from API
*/ */
val requireAdminApproveToJoin: Boolean val requireAdminApproveToJoin: Boolean
/**
* This field represents field "has_aggressive_anti_spam_enabled" from API
*/
val isAggressiveAntiSpamEnabled: Boolean
} }
@Serializable(ExtendedChatSerializer::class) @Serializable(ExtendedChatSerializer::class)