diff options
Diffstat (limited to 'td/telegram/DialogParticipant.cpp')
| -rw-r--r-- | td/telegram/DialogParticipant.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/td/telegram/DialogParticipant.cpp b/td/telegram/DialogParticipant.cpp index 323ec8dbc..5a83c8841 100644 --- a/td/telegram/DialogParticipant.cpp +++ b/td/telegram/DialogParticipant.cpp @@ -196,7 +196,7 @@ RestrictedRights::RestrictedRights(const tl_object_ptr<telegram_api::chatBannedR !rights->send_stickers_, !rights->send_gifs_, !rights->send_games_, !rights->send_inline_, !rights->embed_links_, !rights->send_polls_, !rights->change_info_, !rights->invite_users_, !rights->pin_messages_, !rights->manage_topics_, !rights->edit_rank_, - !rights->send_reactions_, channel_type); + !rights->send_reactions_, !rights->manage_linked_peers_, channel_type); } RestrictedRights::RestrictedRights(const td_api::object_ptr<td_api::chatPermissions> &rights, @@ -212,7 +212,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_send_other_messages_, rights->can_add_link_previews_, rights->can_send_polls_, rights->can_change_info_, rights->can_invite_users_, rights->can_pin_messages_, rights->can_create_topics_, - rights->can_edit_tag_, rights->can_react_to_messages_, channel_type); + rights->can_edit_tag_, rights->can_react_to_messages_, false, channel_type); } RestrictedRights::RestrictedRights(bool can_send_messages, bool can_send_audios, bool can_send_documents, @@ -221,7 +221,7 @@ RestrictedRights::RestrictedRights(bool can_send_messages, bool can_send_audios, bool can_send_games, bool can_use_inline_bots, bool can_add_web_page_previews, bool can_send_polls, bool can_change_info_and_settings, bool can_invite_users, bool can_pin_messages, bool can_manage_topics, bool can_edit_rank, - bool can_send_reactions, ChannelType channel_type) { + bool can_send_reactions, bool can_manage_linked_peers, ChannelType channel_type) { if (channel_type == ChannelType::Broadcast) { flags_ = 0; return; @@ -244,7 +244,8 @@ RestrictedRights::RestrictedRights(bool can_send_messages, bool can_send_audios, (static_cast<uint64>(can_pin_messages) * CAN_PIN_MESSAGES) | (static_cast<uint64>(can_manage_topics) * CAN_MANAGE_TOPICS) | (static_cast<uint64>(can_edit_rank) * CAN_EDIT_RANK) | - (static_cast<uint64>(can_send_reactions) * CAN_SEND_REACTIONS); + (static_cast<uint64>(can_send_reactions) * CAN_SEND_REACTIONS) | + (static_cast<uint64>(can_manage_linked_peers) * CAN_MANAGE_LINKED_PEERS); } RestrictedRights RestrictedRights::restrict_all() { @@ -268,7 +269,7 @@ telegram_api::object_ptr<telegram_api::chatBannedRights> RestrictedRights::get_c !can_send_polls(), !can_change_info_and_settings(), !can_invite_users(), !can_pin_messages(), !can_manage_topics(), !can_send_photos(), !can_send_videos(), !can_send_video_notes(), !can_send_audios(), !can_send_voice_notes(), !can_send_documents(), !can_send_messages(), !can_edit_rank(), !can_send_reactions(), - false, 0); + !can_manage_linked_peers(), 0); } bool operator==(const RestrictedRights &lhs, const RestrictedRights &rhs) { @@ -338,6 +339,9 @@ StringBuilder &operator<<(StringBuilder &string_builder, const RestrictedRights if (!status.can_send_reactions()) { string_builder << "(reactions)"; } + if (!status.can_manage_linked_peers()) { + string_builder << "(manage_linked_peers)"; + } return string_builder; } @@ -445,7 +449,8 @@ RestrictedRights DialogParticipantStatus::get_effective_restricted_rights() cons can_send_videos(), can_send_video_notes(), can_send_voice_notes(), can_send_stickers(), can_send_animations(), can_send_games(), can_use_inline_bots(), can_add_web_page_previews(), can_send_polls(), can_change_info_and_settings(), can_invite_users(), can_pin_messages(), - can_create_topics(), can_edit_rank(), can_send_reactions(), ChannelType::Unknown); + can_create_topics(), can_edit_rank(), can_send_reactions(), can_manage_linked_peers(), + ChannelType::Unknown); } td_api::object_ptr<td_api::ChatMemberStatus> DialogParticipantStatus::get_chat_member_status_object( |
