mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +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 allowsMultipleAnswersField = "allows_multiple_answers"
|
||||||
const val isAnonymousField = "is_anonymous"
|
const val isAnonymousField = "is_anonymous"
|
||||||
const val canManageTopicsField = "can_manage_topics"
|
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 captionEntitiesField = "caption_entities"
|
||||||
const val hasSpoilerField = "has_spoiler"
|
const val hasSpoilerField = "has_spoiler"
|
||||||
const val loginUrlField = "login_url"
|
const val loginUrlField = "login_url"
|
||||||
|
@ -35,7 +35,13 @@ data class AdministratorChatMemberImpl(
|
|||||||
@SerialName(customTitleField)
|
@SerialName(customTitleField)
|
||||||
override val customTitle: String? = null,
|
override val customTitle: String? = null,
|
||||||
@SerialName(canManageTopicsField)
|
@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 {
|
) : AdministratorChatMember {
|
||||||
@SerialName(statusField)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
|
@ -16,4 +16,7 @@ sealed interface ChatAdministratorRights : SpecialChatAdministratorRights {
|
|||||||
val canPromoteMembers: Boolean
|
val canPromoteMembers: Boolean
|
||||||
val canPostMessages: Boolean
|
val canPostMessages: Boolean
|
||||||
val canEditMessages: Boolean
|
val canEditMessages: Boolean
|
||||||
|
val canPostStories: Boolean
|
||||||
|
val canEditStories: Boolean
|
||||||
|
val canDeleteStories: Boolean
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,11 @@ data class ChatAdministratorRightsImpl(
|
|||||||
@SerialName(isAnonymousField)
|
@SerialName(isAnonymousField)
|
||||||
override val isAnonymous: Boolean = false,
|
override val isAnonymous: Boolean = false,
|
||||||
@SerialName(canManageTopicsField)
|
@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
|
) : ChatAdministratorRights
|
||||||
|
@ -36,6 +36,12 @@ data class OwnerChatMember(
|
|||||||
override val canManageChat: Boolean = true
|
override val canManageChat: Boolean = true
|
||||||
@Transient
|
@Transient
|
||||||
override val canManageTopics: Boolean = true
|
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)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
private val type: String = "creator"
|
private val type: String = "creator"
|
||||||
|
Loading…
Reference in New Issue
Block a user