aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/DialogParticipant.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-05-23 21:36:51 +0300
committerlevlam <levlam@telegram.org>2026-05-23 21:36:51 +0300
commit4ae93d66b1ee2cda5d0f146e2ce3f8f5c48080e2 (patch)
tree2fbc0eaa343af3d0d61d3b9460cafaa6a66caaab /td/telegram/DialogParticipant.cpp
parentefcb810dfeb7b5e7fb1d152f74afacf1ea4bf937 (diff)
Add and use RestrictedRights::restrict_all().
Diffstat (limited to 'td/telegram/DialogParticipant.cpp')
-rw-r--r--td/telegram/DialogParticipant.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/td/telegram/DialogParticipant.cpp b/td/telegram/DialogParticipant.cpp
index 161bdf586..a0dee579d 100644
--- a/td/telegram/DialogParticipant.cpp
+++ b/td/telegram/DialogParticipant.cpp
@@ -242,6 +242,11 @@ RestrictedRights::RestrictedRights(bool can_send_messages, bool can_send_audios,
(static_cast<uint64>(can_send_reactions) * CAN_SEND_REACTIONS);
}
+RestrictedRights RestrictedRights::restrict_all() {
+ td_api::object_ptr<td_api::chatPermissions> default_rights; // nullptr
+ return RestrictedRights(default_rights, ChannelType::Unknown);
+}
+
td_api::object_ptr<td_api::chatPermissions> RestrictedRights::get_chat_permissions_object() const {
return td_api::make_object<td_api::chatPermissions>(
can_send_messages(), can_send_audios(), can_send_documents(), can_send_photos(), can_send_videos(),