aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/DialogParticipant.h
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-04-21 22:31:24 +0300
committerlevlam <levlam@telegram.org>2026-04-21 22:31:24 +0300
commit95c14cd60780e76ef4b2467cc6b15b6346bfdb60 (patch)
tree46f59632759c90023eeb13a15db46f06169b1995 /td/telegram/DialogParticipant.h
parent65b967524b5591341c2f99b1eeb0e3e592bf12d8 (diff)
Add chatPermissions.can_react_to_messages.
Diffstat (limited to 'td/telegram/DialogParticipant.h')
-rw-r--r--td/telegram/DialogParticipant.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/td/telegram/DialogParticipant.h b/td/telegram/DialogParticipant.h
index 07b81a95d..2d82553f7 100644
--- a/td/telegram/DialogParticipant.h
+++ b/td/telegram/DialogParticipant.h
@@ -191,6 +191,7 @@ class RestrictedRights {
static constexpr uint64 CAN_PIN_MESSAGES = 1 << 26;
static constexpr uint64 CAN_MANAGE_TOPICS = 1 << 12;
static constexpr uint64 CAN_EDIT_RANK = static_cast<uint64>(1) << 38;
+ static constexpr uint64 CAN_SEND_REACTIONS = static_cast<uint64>(1) << 39;
static constexpr uint64 ALL_ADMIN_PERMISSION_RIGHTS =
CAN_CHANGE_INFO_AND_SETTINGS | CAN_INVITE_USERS | CAN_PIN_MESSAGES | CAN_MANAGE_TOPICS;
@@ -198,7 +199,8 @@ class RestrictedRights {
static constexpr uint64 ALL_RESTRICTED_RIGHTS =
CAN_SEND_MESSAGES | CAN_SEND_STICKERS | CAN_SEND_ANIMATIONS | CAN_SEND_GAMES | CAN_USE_INLINE_BOTS |
CAN_ADD_WEB_PAGE_PREVIEWS | CAN_SEND_POLLS | ALL_ADMIN_PERMISSION_RIGHTS | CAN_SEND_AUDIOS | CAN_SEND_DOCUMENTS |
- CAN_SEND_PHOTOS | CAN_SEND_VIDEOS | CAN_SEND_VIDEO_NOTES | CAN_SEND_VOICE_NOTES | CAN_EDIT_RANK;
+ CAN_SEND_PHOTOS | CAN_SEND_VIDEOS | CAN_SEND_VIDEO_NOTES | CAN_SEND_VOICE_NOTES | CAN_EDIT_RANK |
+ CAN_SEND_REACTIONS;
uint64 flags_;
@@ -218,7 +220,7 @@ class RestrictedRights {
bool can_send_animations, 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,
- ChannelType channel_type);
+ bool can_send_reactions, ChannelType channel_type);
td_api::object_ptr<td_api::chatPermissions> get_chat_permissions_object() const;
@@ -296,6 +298,10 @@ class RestrictedRights {
return (flags_ & CAN_EDIT_RANK) != 0;
}
+ bool can_send_reactions() const {
+ return (flags_ & CAN_SEND_REACTIONS) != 0;
+ }
+
template <class StorerT>
void store(StorerT &storer) const {
td::store(flags_, storer);
@@ -553,6 +559,10 @@ class DialogParticipantStatus {
return get_restricted_rights().can_edit_rank();
}
+ bool can_send_reactions() const {
+ return get_restricted_rights().can_send_reactions();
+ }
+
void set_is_member(bool is_member) {
if (is_member) {
flags_ |= IS_MEMBER;