mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
add support of stories rights
This commit is contained in:
parent
97a3901cb9
commit
5215e8a315
@ -275,6 +275,9 @@ const val correctOptionIdField = "correct_option_id"
|
||||
const val allowsMultipleAnswersField = "allows_multiple_answers"
|
||||
const val isAnonymousField = "is_anonymous"
|
||||
const val canManageTopicsField = "can_manage_topics"
|
||||
const val canPostStoriesField = "can_post_stories"
|
||||
const val canEditStoriesField = "can_edit_stories"
|
||||
const val canDeleteStoriesField = "can_delete_stories"
|
||||
const val captionEntitiesField = "caption_entities"
|
||||
const val hasSpoilerField = "has_spoiler"
|
||||
const val loginUrlField = "login_url"
|
||||
|
@ -35,7 +35,13 @@ data class AdministratorChatMemberImpl(
|
||||
@SerialName(customTitleField)
|
||||
override val customTitle: String? = null,
|
||||
@SerialName(canManageTopicsField)
|
||||
override val canManageTopics: Boolean = false
|
||||
override val canManageTopics: Boolean = false,
|
||||
@SerialName(canPostStoriesField)
|
||||
override val canPostStories: Boolean = false,
|
||||
@SerialName(canEditStoriesField)
|
||||
override val canEditStories: Boolean = false,
|
||||
@SerialName(canDeleteStoriesField)
|
||||
override val canDeleteStories: Boolean = false
|
||||
) : AdministratorChatMember {
|
||||
@SerialName(statusField)
|
||||
@Required
|
||||
|
@ -16,4 +16,7 @@ sealed interface ChatAdministratorRights : SpecialChatAdministratorRights {
|
||||
val canPromoteMembers: Boolean
|
||||
val canPostMessages: Boolean
|
||||
val canEditMessages: Boolean
|
||||
val canPostStories: Boolean
|
||||
val canEditStories: Boolean
|
||||
val canDeleteStories: Boolean
|
||||
}
|
||||
|
@ -29,5 +29,11 @@ data class ChatAdministratorRightsImpl(
|
||||
@SerialName(isAnonymousField)
|
||||
override val isAnonymous: Boolean = false,
|
||||
@SerialName(canManageTopicsField)
|
||||
override val canManageTopics: Boolean = false
|
||||
override val canManageTopics: Boolean = false,
|
||||
@SerialName(canPostStoriesField)
|
||||
override val canPostStories: Boolean = false,
|
||||
@SerialName(canEditStoriesField)
|
||||
override val canEditStories: Boolean = false,
|
||||
@SerialName(canDeleteStoriesField)
|
||||
override val canDeleteStories: Boolean = false
|
||||
) : ChatAdministratorRights
|
||||
|
@ -36,6 +36,12 @@ data class OwnerChatMember(
|
||||
override val canManageChat: Boolean = true
|
||||
@Transient
|
||||
override val canManageTopics: Boolean = true
|
||||
@Transient
|
||||
override val canPostStories: Boolean = true
|
||||
@Transient
|
||||
override val canEditStories: Boolean = true
|
||||
@Transient
|
||||
override val canDeleteStories: Boolean = true
|
||||
@SerialName(statusField)
|
||||
@Required
|
||||
private val type: String = "creator"
|
||||
|
Loading…
Reference in New Issue
Block a user