Rename chat permission to can_create_topics.

This commit is contained in:
levlam 2024-01-17 12:22:56 +03:00
parent 93370af38d
commit 26d63f605b
2 changed files with 10 additions and 10 deletions

View File

@ -645,8 +645,8 @@ inputChatPhotoSticker sticker:chatPhotoSticker = InputChatPhoto;
//@can_change_info True, if the user can change the chat title, photo, and other settings
//@can_invite_users True, if the user can invite new users to the chat
//@can_pin_messages True, if the user can pin messages
//@can_manage_topics True, if the user can manage topics
chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_documents:Bool can_send_photos:Bool can_send_videos:Bool can_send_video_notes:Bool can_send_voice_notes:Bool can_send_polls:Bool can_send_other_messages:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_manage_topics:Bool = ChatPermissions;
//@can_create_topics True, if the user can create topics
chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_documents:Bool can_send_photos:Bool can_send_videos:Bool can_send_video_notes:Bool can_send_voice_notes:Bool can_send_polls:Bool can_send_other_messages:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_create_topics:Bool = ChatPermissions;
//@description Describes rights of the administrator
//@can_manage_chat True, if the administrator can get chat event log, get chat boosts in channels, get channel members, report supergroup spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
@ -657,7 +657,7 @@ chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_docum
//@can_invite_users True, if the administrator can invite new users to the chat
//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics; always true for channels
//@can_pin_messages True, if the administrator can pin messages; applicable to basic groups and supergroups only
//@can_manage_topics True, if the administrator can manage topics; applicable to forum supergroups only
//@can_manage_topics True, if the administrator can create, rename, close, reopen, hide, and unhide forum topics; applicable to forum supergroups only
//@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
//@can_manage_video_chats True, if the administrator can manage video chats
//@can_post_stories True, if the administrator can create new channel stories, or edit and delete posted stories; applicable to channels only
@ -7523,13 +7523,13 @@ editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:Messa
//@description Returns list of custom emojis, which can be used as forum topic icon by all users
getForumTopicDefaultIcons = Stickers;
//@description Creates a topic in a forum supergroup chat; requires can_manage_topics rights in the supergroup
//@description Creates a topic in a forum supergroup chat; requires can_manage_topics or can_create_topics rights in the supergroup
//@chat_id Identifier of the chat
//@name Name of the topic; 1-128 characters
//@icon Icon of the topic. Icon color must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. Telegram Premium users can use any custom emoji as topic icon, other users can use only a custom emoji returned by getForumTopicDefaultIcons
createForumTopic chat_id:int53 name:string icon:forumTopicIcon = ForumTopicInfo;
//@description Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic
//@description Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics right in the supergroup unless the user is creator of the topic
//@chat_id Identifier of the chat
//@message_thread_id Message thread identifier of the forum topic
//@name New name of the topic; 0-128 characters. If empty, the previous topic name is kept
@ -7558,24 +7558,24 @@ getForumTopics chat_id:int53 query:string offset_date:int32 offset_message_id:in
//@notification_settings New notification settings for the forum topic. If the topic is muted for more than 366 days, it is considered to be muted forever
setForumTopicNotificationSettings chat_id:int53 message_thread_id:int53 notification_settings:chatNotificationSettings = Ok;
//@description Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic
//@description Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics right in the supergroup unless the user is creator of the topic
//@chat_id Identifier of the chat
//@message_thread_id Message thread identifier of the forum topic
//@is_closed Pass true to close the topic; pass false to reopen it
toggleForumTopicIsClosed chat_id:int53 message_thread_id:int53 is_closed:Bool = Ok;
//@description Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup
//@description Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics right in the supergroup
//@chat_id Identifier of the chat
//@is_hidden Pass true to hide and close the General topic; pass false to unhide it
toggleGeneralForumTopicIsHidden chat_id:int53 is_hidden:Bool = Ok;
//@description Changes the pinned state of a forum topic; requires can_manage_topics administrator right in the supergroup. There can be up to getOption("pinned_forum_topic_count_max") pinned forum topics
//@description Changes the pinned state of a forum topic; requires can_manage_topics right in the supergroup. There can be up to getOption("pinned_forum_topic_count_max") pinned forum topics
//@chat_id Chat identifier
//@message_thread_id Message thread identifier of the forum topic
//@is_pinned Pass true to pin the topic; pass false to unpin it
toggleForumTopicIsPinned chat_id:int53 message_thread_id:int53 is_pinned:Bool = Ok;
//@description Changes the order of pinned forum topics @chat_id Chat identifier @message_thread_ids The new list of pinned forum topics
//@description Changes the order of pinned forum topics; requires can_manage_topics right in the supergroup @chat_id Chat identifier @message_thread_ids The new list of pinned forum topics
setPinnedForumTopics chat_id:int53 message_thread_ids:vector<int53> = Ok;
//@description Deletes all messages in a forum topic; requires can_delete_messages administrator right in the supergroup unless the user is creator of the topic, the topic has no messages from other users and has at most 11 messages

View File

@ -246,7 +246,7 @@ RestrictedRights::RestrictedRights(const td_api::object_ptr<td_api::chatPermissi
rights->can_send_other_messages_, rights->can_send_other_messages_,
rights->can_send_other_messages_, rights->can_add_web_page_previews_,
rights->can_send_polls_, rights->can_change_info_, rights->can_invite_users_,
rights->can_pin_messages_, rights->can_manage_topics_, channel_type);
rights->can_pin_messages_, rights->can_create_topics_, channel_type);
}
RestrictedRights::RestrictedRights(bool can_send_messages, bool can_send_audios, bool can_send_documents,