Skip to content

Commit 51362d1

Browse files
committed
1 parent 5a1b35d commit 51362d1

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

compiler/api/source/main_api.tl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2668,7 +2668,7 @@ messages.addPollAnswer#19bc4b6d peer:InputPeer msg_id:int answer:PollAnswer = Up
26682668
messages.deletePollAnswer#ac8505a5 peer:InputPeer msg_id:int option:bytes = Updates;
26692669
messages.getUnreadPollVotes#43286cf2 flags:# peer:InputPeer top_msg_id:flags.0?int offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
26702670
messages.readPollVotes#1720b4d8 flags:# peer:InputPeer top_msg_id:flags.0?int = messages.AffectedHistory;
2671-
messages.setBotGuestChatResult#52b08db query_id:long result:InputBotInlineResult = Bool;
2671+
messages.setBotGuestChatResult#b8f106e3 query_id:long result:InputBotInlineResult = InputBotInlineMessageID;
26722672
messages.deleteParticipantReactions#a0b80cf8 peer:InputPeer participant:InputPeer = Bool;
26732673
messages.deleteParticipantReaction#e3b7f82c peer:InputPeer msg_id:int participant:InputPeer = Updates;
26742674
messages.getPersonalChannelHistory#55fb0996 user_id:InputUser limit:int max_id:int min_id:int hash:long = messages.Messages;

pyrogram/types/user_and_chats/chat_permissions.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class ChatPermissions(Object):
7777
can_edit_tag (``bool``, *optional*):
7878
True, if the user may change the tag of self.
7979
80-
can_send_reactions (``bool``, *optional*):
81-
True, if the user is allowed to react on messages.
80+
can_react_to_messages (``bool``, *optional*):
81+
True, if the user is allowed to react to messages. If omitted, defaults to the value of *can_send_messages*.
8282
8383
"""
8484

@@ -101,7 +101,7 @@ def __init__(
101101
can_manage_topics: bool = None,
102102
can_send_media_messages: bool = None, # Audio files, documents, photos, videos, video notes and voice notes
103103
can_edit_tag: bool = None,
104-
can_send_reactions: bool = None,
104+
can_react_to_messages: bool = None,
105105
):
106106
super().__init__(None)
107107

@@ -121,7 +121,7 @@ def __init__(
121121
self.can_manage_topics = can_manage_topics
122122
self.can_send_media_messages = can_send_media_messages
123123
self.can_edit_tag = can_edit_tag
124-
self.can_send_reactions = can_send_reactions
124+
self.can_react_to_messages = can_react_to_messages
125125

126126
@staticmethod
127127
def _parse(denied_permissions: "raw.base.ChatBannedRights") -> "ChatPermissions":
@@ -141,7 +141,7 @@ def _parse(denied_permissions: "raw.base.ChatBannedRights") -> "ChatPermissions"
141141
can_manage_topics = False
142142
can_send_media_messages = False
143143
can_edit_tag = False
144-
can_send_reactions = False
144+
can_react_to_messages = False
145145

146146
if isinstance(denied_permissions, raw.types.ChatBannedRights):
147147
can_send_messages = not denied_permissions.send_messages
@@ -183,7 +183,7 @@ def _parse(denied_permissions: "raw.base.ChatBannedRights") -> "ChatPermissions"
183183
can_send_video_notes = can_send_media_messages
184184
can_send_voice_notes = can_send_media_messages
185185
can_edit_tag = not denied_permissions.edit_rank
186-
can_send_reactions = not denied_permissions.send_reactions
186+
can_react_to_messages = not denied_permissions.send_reactions
187187

188188
return ChatPermissions(
189189
can_send_messages=can_send_messages,
@@ -202,7 +202,7 @@ def _parse(denied_permissions: "raw.base.ChatBannedRights") -> "ChatPermissions"
202202
can_manage_topics=can_manage_topics,
203203
can_send_media_messages=can_send_media_messages,
204204
can_edit_tag=can_edit_tag,
205-
can_send_reactions=can_send_reactions
205+
can_react_to_messages=can_react_to_messages
206206
)
207207

208208
def write(
@@ -235,6 +235,6 @@ def write(
235235
send_roundvideos=not permissions.can_send_video_notes,# TODO
236236
send_voices=not permissions.can_send_voice_notes,# TODO
237237
# send_plain:flags.25?true
238-
edit_rank=permissions.can_edit_tag,
239-
send_reactions=permissions.can_send_reactions,
238+
edit_rank=not permissions.can_edit_tag,
239+
send_reactions=not permissions.can_react_to_messages if permissions.can_react_to_messages is not None else not permissions.can_send_messages,
240240
)

0 commit comments

Comments
 (0)