Updated docs for can_post_stories, can_edit_stories and can_delete_stories admin privileges

This commit is contained in:
Andrey Brusnik 2024-07-20 16:06:20 +04:00
parent a8970bb925
commit 9d45244efb
No known key found for this signature in database
GPG key ID: D33232F28CFF442C
4 changed files with 17 additions and 24 deletions

View file

@ -2098,17 +2098,17 @@ Schema(
Param( Param(
name: "can_post_stories", name: "can_post_stories",
ty: Option(bool), ty: Option(bool),
descr: Doc(md: "Pass True, if the administrator can post stories in the channel, channels only") descr: Doc(md: "Pass True, if the administrator can post stories to the chat")
), ),
Param( Param(
name: "can_edit_stories", name: "can_edit_stories",
ty: Option(bool), ty: Option(bool),
descr: Doc(md: "Pass True, if the administrator can edit stories posted by other users, channels only") descr: Doc(md: "Pass True, if the administrator can edit stories posted by other users")
), ),
Param( Param(
name: "can_delete_stories", name: "can_delete_stories",
ty: Option(bool), ty: Option(bool),
descr: Doc(md: "Pass True, if the administrator can delete stories posted by other users, channels only") descr: Doc(md: "Pass True, if the administrator can delete stories posted by other users")
), ),
Param( Param(
name: "can_manage_video_chats", name: "can_manage_video_chats",

View file

@ -25,11 +25,11 @@ impl_payload! {
pub can_edit_messages: bool, pub can_edit_messages: bool,
/// Pass True, if the administrator can delete messages of other users /// Pass True, if the administrator can delete messages of other users
pub can_delete_messages: bool, pub can_delete_messages: bool,
/// Pass True, if the administrator can post stories in the channel, channels only /// Pass True, if the administrator can post stories to the chat
pub can_post_stories: bool, pub can_post_stories: bool,
/// Pass True, if the administrator can edit stories posted by other users, channels only /// Pass True, if the administrator can edit stories posted by other users
pub can_edit_stories: bool, pub can_edit_stories: bool,
/// Pass True, if the administrator can delete stories posted by other users, channels only /// Pass True, if the administrator can delete stories posted by other users
pub can_delete_stories: bool, pub can_delete_stories: bool,
/// Pass True, if the administrator can manage video chats, supergroups only /// Pass True, if the administrator can manage video chats, supergroups only
pub can_manage_video_chats: bool, pub can_manage_video_chats: bool,

View file

@ -47,16 +47,13 @@ pub struct ChatAdministratorRights {
/// supergroups only /// supergroups only
pub can_pin_messages: Option<bool>, pub can_pin_messages: Option<bool>,
/// `true`, if the administrator can post stories in the channel; /// `true`, if the administrator can post stories to the chat
/// channels only
pub can_post_stories: Option<bool>, pub can_post_stories: Option<bool>,
/// `true`, if the administrator can edit stories posted by other users; /// `true`, if the administrator can edit stories posted by other users
/// channels only
pub can_edit_stories: Option<bool>, pub can_edit_stories: Option<bool>,
/// `true`, if the administrator can delete stories posted by other users; /// `true`, if the administrator can delete stories posted by other users
/// channels only
pub can_delete_stories: Option<bool>, pub can_delete_stories: Option<bool>,
/// `true`, if the user is allowed to create, rename, close, and reopen /// `true`, if the user is allowed to create, rename, close, and reopen

View file

@ -80,18 +80,15 @@ pub struct Administrator {
/// `true` if the administrator can delete messages of other users. /// `true` if the administrator can delete messages of other users.
pub can_delete_messages: bool, pub can_delete_messages: bool,
/// `true` if the administrator can post stories in the channel, channels /// `true` if the administrator can post stories to the chat.
/// only.
#[serde(default)] #[serde(default)]
pub can_post_stories: bool, pub can_post_stories: bool,
/// `true` if the administrator can edit stories posted by other users, /// `true` if the administrator can edit stories posted by other users.
/// channels only.
#[serde(default)] #[serde(default)]
pub can_edit_stories: bool, pub can_edit_stories: bool,
/// `true` if the administrator can delete stories posted by other users, /// `true` if the administrator can delete stories posted by other users.
/// channels only.
#[serde(default)] #[serde(default)]
pub can_delete_stories: bool, pub can_delete_stories: bool,
@ -447,8 +444,7 @@ impl ChatMemberKind {
} }
} }
/// Returns `true` if the user can post stories in the channel, channels /// Returns `true` if the administrator can post stories to the chat.
/// only.
/// ///
/// I.e. returns `true` if the user /// I.e. returns `true` if the user
/// - is the owner of the chat (even if the chat is not a channel) /// - is the owner of the chat (even if the chat is not a channel)
@ -467,8 +463,8 @@ impl ChatMemberKind {
} }
} }
/// Returns `true` if the user can edit stories posted by other users, /// Returns `true` if the administrator can edit stories posted by other
/// channels only. /// users.
/// ///
/// I.e. returns `true` if the user /// I.e. returns `true` if the user
/// - is the owner of the chat (even if the chat is not a channel) /// - is the owner of the chat (even if the chat is not a channel)
@ -487,8 +483,8 @@ impl ChatMemberKind {
} }
} }
/// Returns `true` if the user can delete stories posted by other users, /// Returns `true` if the administrator can delete stories posted by other
/// channels only. /// users.
/// ///
/// I.e. returns `true` if the user /// I.e. returns `true` if the user
/// - is the owner of the chat /// - is the owner of the chat