aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/DialogParticipant.h
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-07-09 12:44:48 +0300
committerlevlam <levlam@telegram.org>2026-07-09 12:44:48 +0300
commit67bb8bf40584c0d7d54292b63741561e1f6b69e5 (patch)
treeea09e6a6367a4ba305a255ed7ae453e65bc661c5 /td/telegram/DialogParticipant.h
parenta17f7d29e5e19f07843537aff8d6bc6d7a677390 (diff)
Support manage_linked_peers administrator right.
Diffstat (limited to 'td/telegram/DialogParticipant.h')
-rw-r--r--td/telegram/DialogParticipant.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/td/telegram/DialogParticipant.h b/td/telegram/DialogParticipant.h
index 0edf0e236..776c2dc5a 100644
--- a/td/telegram/DialogParticipant.h
+++ b/td/telegram/DialogParticipant.h
@@ -40,13 +40,14 @@ class AdministratorRights {
static constexpr uint64 CAN_DELETE_STORIES = static_cast<uint64>(1) << 50;
static constexpr uint64 CAN_MANAGE_DIRECT_MESSAGES = static_cast<uint64>(1) << 51;
static constexpr uint64 CAN_MANAGE_RANKS = static_cast<uint64>(1) << 52;
+ static constexpr uint64 CAN_MANAGE_LINKED_PEERS = static_cast<uint64>(1) << 53;
static constexpr uint64 IS_ANONYMOUS = 1 << 13;
static constexpr uint64 ALL_ADMINISTRATOR_RIGHTS =
CAN_CHANGE_INFO_AND_SETTINGS | CAN_POST_MESSAGES | CAN_EDIT_MESSAGES | CAN_DELETE_MESSAGES | CAN_INVITE_USERS |
CAN_RESTRICT_MEMBERS | CAN_PIN_MESSAGES | CAN_MANAGE_TOPICS | CAN_PROMOTE_MEMBERS | CAN_MANAGE_CALLS |
CAN_MANAGE_DIALOG | CAN_POST_STORIES | CAN_EDIT_STORIES | CAN_DELETE_STORIES | CAN_MANAGE_DIRECT_MESSAGES |
- CAN_MANAGE_RANKS;
+ CAN_MANAGE_RANKS | CAN_MANAGE_LINKED_PEERS;
uint64 flags_;
@@ -69,7 +70,7 @@ class AdministratorRights {
bool can_restrict_members, bool can_pin_messages, bool can_manage_topics,
bool can_promote_members, bool can_manage_calls, bool can_post_stories, bool can_edit_stories,
bool can_delete_stories, bool can_manage_direct_messages, bool can_manage_ranks,
- ChannelType channel_type);
+ bool can_manage_linked_peers, ChannelType channel_type);
telegram_api::object_ptr<telegram_api::chatAdminRights> get_chat_admin_rights() const;
@@ -139,6 +140,10 @@ class AdministratorRights {
return (flags_ & CAN_MANAGE_RANKS) != 0;
}
+ bool can_manage_linked_peers() const {
+ return (flags_ & CAN_MANAGE_LINKED_PEERS) != 0;
+ }
+
bool is_anonymous() const {
return (flags_ & IS_ANONYMOUS) != 0;
}
@@ -495,6 +500,10 @@ class DialogParticipantStatus {
return get_administrator_rights().can_manage_ranks();
}
+ bool can_manage_linked_peers() const {
+ return get_administrator_rights().can_manage_linked_peers();
+ }
+
bool can_be_edited() const {
return (flags_ & CAN_BE_EDITED) != 0;
}