Skip to content

File tree

compiler/api/source/main_api.tl

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ geoPoint#b2a2f663 flags:# long:double lat:double access_hash:long accuracy_radiu
275275

276276
auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
277277
auth.sentCodeSuccess#2390fe44 authorization:auth.Authorization = auth.SentCode;
278-
auth.sentCodePaymentRequired#e0955a3c store_product:string phone_code_hash:string support_email_address:string support_email_subject:string currency:string amount:long = auth.SentCode;
278+
auth.sentCodePaymentRequired#f8827ebf store_product:string phone_code_hash:string support_email_address:string support_email_subject:string premium_days:int currency:string amount:long = auth.SentCode;
279279

280280
auth.authorization#2ea2c0d4 flags:# setup_password_required:flags.1?true otherwise_relogin_days:flags.1?int tmp_sessions:flags.0?int future_auth_token:flags.2?bytes user:User = auth.Authorization;
281281
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
@@ -902,6 +902,7 @@ topPeerCategoryPhoneCalls#1e76a78c = TopPeerCategory;
902902
topPeerCategoryForwardUsers#a8406ca9 = TopPeerCategory;
903903
topPeerCategoryForwardChats#fbeec0f0 = TopPeerCategory;
904904
topPeerCategoryBotsApp#fd9e7bec = TopPeerCategory;
905+
topPeerCategoryBotsGuestChat#6c24f3dd = TopPeerCategory;
905906

906907
topPeerCategoryPeers#fb834291 category:TopPeerCategory count:int peers:Vector<TopPeer> = TopPeerCategoryPeers;
907908

@@ -1294,7 +1295,7 @@ statsURL#47a971e0 url:string = StatsURL;
12941295

12951296
chatAdminRights#5fb224d5 flags:# change_info:flags.0?true post_messages:flags.1?true edit_messages:flags.2?true delete_messages:flags.3?true ban_users:flags.4?true invite_users:flags.5?true pin_messages:flags.7?true add_admins:flags.9?true anonymous:flags.10?true manage_call:flags.11?true other:flags.12?true manage_topics:flags.13?true post_stories:flags.14?true edit_stories:flags.15?true delete_stories:flags.16?true manage_direct_messages:flags.17?true manage_ranks:flags.18?true = ChatAdminRights;
12961297

1297-
chatBannedRights#9f120418 flags:# view_messages:flags.0?true send_messages:flags.1?true send_media:flags.2?true send_stickers:flags.3?true send_gifs:flags.4?true send_games:flags.5?true send_inline:flags.6?true embed_links:flags.7?true send_polls:flags.8?true change_info:flags.10?true invite_users:flags.15?true pin_messages:flags.17?true manage_topics:flags.18?true send_photos:flags.19?true send_videos:flags.20?true send_roundvideos:flags.21?true send_audios:flags.22?true send_voices:flags.23?true send_docs:flags.24?true send_plain:flags.25?true edit_rank:flags.26?true until_date:int = ChatBannedRights;
1298+
chatBannedRights#9f120418 flags:# view_messages:flags.0?true send_messages:flags.1?true send_media:flags.2?true send_stickers:flags.3?true send_gifs:flags.4?true send_games:flags.5?true send_inline:flags.6?true embed_links:flags.7?true send_polls:flags.8?true change_info:flags.10?true invite_users:flags.15?true pin_messages:flags.17?true manage_topics:flags.18?true send_photos:flags.19?true send_videos:flags.20?true send_roundvideos:flags.21?true send_audios:flags.22?true send_voices:flags.23?true send_docs:flags.24?true send_plain:flags.25?true edit_rank:flags.26?true send_reactions:flags.27?true until_date:int = ChatBannedRights;
12981299

12991300
inputWallPaper#e630b979 id:long access_hash:long = InputWallPaper;
13001301
inputWallPaperSlug#72091c80 slug:string = InputWallPaper;
@@ -1611,7 +1612,7 @@ inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?t
16111612
inputStorePaymentStarsTopup#f9a2a6cb flags:# stars:long currency:string amount:long spend_purpose_peer:flags.0?InputPeer = InputStorePaymentPurpose;
16121613
inputStorePaymentStarsGift#1d741ef7 user_id:InputUser stars:long currency:string amount:long = InputStorePaymentPurpose;
16131614
inputStorePaymentStarsGiveaway#751f08fa flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true stars:long boost_peer:InputPeer additional_peers:flags.1?Vector<InputPeer> countries_iso2:flags.2?Vector<string> prize_description:flags.4?string random_id:long until_date:int currency:string amount:long users:int = InputStorePaymentPurpose;
1614-
inputStorePaymentAuthCode#9bb2636d flags:# restore:flags.0?true phone_number:string phone_code_hash:string currency:string amount:long = InputStorePaymentPurpose;
1615+
inputStorePaymentAuthCode#3fc18057 flags:# restore:flags.0?true phone_number:string phone_code_hash:string premium_days:int currency:string amount:long = InputStorePaymentPurpose;
16151616

16161617
paymentFormMethod#88f8f21b url:string title:string = PaymentFormMethod;
16171618

@@ -2198,14 +2199,6 @@ bots.requestedButton#f13bbcd7 webapp_req_id:string = bots.RequestedButton;
21982199

21992200
messages.composedMessageWithAI#90d7adfa flags:# result_text:TextWithEntities diff_text:flags.0?TextWithEntities = messages.ComposedMessageWithAI;
22002201

2201-
channels.found#3128c4bc flags:# results:Vector<Peer> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = channels.Found;
2202-
2203-
personalChannel#19bc407d user_id:long channel_id:long = PersonalChannel;
2204-
2205-
channels.personalChannels#d69ae84d channels:Vector<PersonalChannel> chats:Vector<Chat> users:Vector<User> = channels.PersonalChannels;
2206-
2207-
channelTopic#93a5df73 id:int title:string = ChannelTopic;
2208-
22092202
stats.pollStats#2999beed votes_graph:StatsGraph = stats.PollStats;
22102203

22112204
inputAiComposeToneDefault#1fe9a9bf tone:string = InputAiComposeTone;
@@ -2218,7 +2211,7 @@ aiComposeToneDefault#9bad6414 tone:string emoji_id:long title:string = AiCompose
22182211
aicompose.tonesNotModified#c1f46103 = aicompose.Tones;
22192212
aicompose.tones#6c9d0efe hash:long tones:Vector<AiComposeTone> users:Vector<User> = aicompose.Tones;
22202213

2221-
aiComposeToneExample#a8dc3b99 from:string to:string = AiComposeToneExample;
2214+
aiComposeToneExample#f1d628ec from:TextWithEntities to:TextWithEntities = AiComposeToneExample;
22222215

22232216
bots.accessSettings#dd1fbf93 flags:# restricted:flags.0?true add_users:flags.1?Vector<User> = bots.AccessSettings;
22242217

@@ -2406,7 +2399,7 @@ contacts.unblock#b550d328 flags:# my_stories_from:flags.0?true id:InputPeer = Bo
24062399
contacts.getBlocked#9a868f80 flags:# my_stories_from:flags.0?true offset:int limit:int = contacts.Blocked;
24072400
contacts.search#11f812d8 q:string limit:int = contacts.Found;
24082401
contacts.resolveUsername#725afbbc flags:# username:string referer:flags.0?string = contacts.ResolvedPeer;
2409-
contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true bots_app:flags.16?true offset:int limit:int hash:long = contacts.TopPeers;
2402+
contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true bots_app:flags.16?true bots_guestchat:flags.17?true offset:int limit:int hash:long = contacts.TopPeers;
24102403
contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = Bool;
24112404
contacts.resetSaved#879537f1 = Bool;
24122405
contacts.getSaved#82f1e39f = Vector<SavedContact>;
@@ -2676,6 +2669,9 @@ messages.deletePollAnswer#ac8505a5 peer:InputPeer msg_id:int option:bytes = Upda
26762669
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;
26772670
messages.readPollVotes#1720b4d8 flags:# peer:InputPeer top_msg_id:flags.0?int = messages.AffectedHistory;
26782671
messages.setBotGuestChatResult#52b08db query_id:long result:InputBotInlineResult = Bool;
2672+
messages.deleteParticipantReactions#a0b80cf8 peer:InputPeer participant:InputPeer = Bool;
2673+
messages.deleteParticipantReaction#e3b7f82c peer:InputPeer msg_id:int participant:InputPeer = Updates;
2674+
messages.getPersonalChannelHistory#55fb0996 user_id:InputUser limit:int max_id:int min_id:int hash:long = messages.Messages;
26792675

26802676
updates.getState#edd4882a = updates.State;
26812677
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
@@ -2780,9 +2776,6 @@ channels.toggleAutotranslation#167fc0a1 channel:InputChannel enabled:Bool = Upda
27802776
channels.getMessageAuthor#ece2a0e6 channel:InputChannel id:int = User;
27812777
channels.checkSearchPostsFlood#22567115 flags:# query:flags.0?string = SearchPostsFlood;
27822778
channels.setMainProfileTab#3583fcb1 channel:InputChannel tab:ProfileTab = Bool;
2783-
channels.search#27d79557 flags:# q:flags.0?string topic_id:flags.1?int offset:string = channels.Found;
2784-
channels.getContactPersonalChannels#509b3c66 = channels.PersonalChannels;
2785-
channels.getTopics#7ab18dcc lang_code:string = Vector<ChannelTopic>;
27862779

27872780
bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON;
27882781
bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool;

pyrogram/types/authorization/sent_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def _parse(sent_code: raw.base.auth.SentCode) -> "SentCode":
5858
if isinstance(sent_code, raw.types.auth.SentCodePaymentRequired):
5959
# TODO: raw.functions.auth.CheckPaidAuth
6060
raise Unauthorized(
61-
f"You need to pay {sent_code.amount}{sent_code.currency} or contact {sent_code.support_email_subject} ({sent_code.support_email_address}) which is currently not supported by Pyrogram."
61+
f"You need to purchase premium for {sent_code.premium_days} days by paying {sent_code.amount}{sent_code.currency} or contact {sent_code.support_email_subject} ({sent_code.support_email_address}) which is currently not supported by Pyrogram."
6262
)
6363

6464
if isinstance(sent_code, raw.types.auth.SentCode):

pyrogram/types/user_and_chats/chat_permissions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ 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.
82+
8083
"""
8184

8285
def __init__(
@@ -98,6 +101,7 @@ def __init__(
98101
can_manage_topics: bool = None,
99102
can_send_media_messages: bool = None, # Audio files, documents, photos, videos, video notes and voice notes
100103
can_edit_tag: bool = None,
104+
can_send_reactions: bool = None,
101105
):
102106
super().__init__(None)
103107

@@ -117,6 +121,7 @@ def __init__(
117121
self.can_manage_topics = can_manage_topics
118122
self.can_send_media_messages = can_send_media_messages
119123
self.can_edit_tag = can_edit_tag
124+
self.can_send_reactions = can_send_reactions
120125

121126
@staticmethod
122127
def _parse(denied_permissions: "raw.base.ChatBannedRights") -> "ChatPermissions":
@@ -136,6 +141,7 @@ def _parse(denied_permissions: "raw.base.ChatBannedRights") -> "ChatPermissions"
136141
can_manage_topics = False
137142
can_send_media_messages = False
138143
can_edit_tag = False
144+
can_send_reactions = False
139145

140146
if isinstance(denied_permissions, raw.types.ChatBannedRights):
141147
can_send_messages = not denied_permissions.send_messages
@@ -177,6 +183,7 @@ def _parse(denied_permissions: "raw.base.ChatBannedRights") -> "ChatPermissions"
177183
can_send_video_notes = can_send_media_messages
178184
can_send_voice_notes = can_send_media_messages
179185
can_edit_tag = not denied_permissions.edit_rank
186+
can_send_reactions = not denied_permissions.send_reactions
180187

181188
return ChatPermissions(
182189
can_send_messages=can_send_messages,
@@ -195,6 +202,7 @@ def _parse(denied_permissions: "raw.base.ChatBannedRights") -> "ChatPermissions"
195202
can_manage_topics=can_manage_topics,
196203
can_send_media_messages=can_send_media_messages,
197204
can_edit_tag=can_edit_tag,
205+
can_send_reactions=can_send_reactions
198206
)
199207

200208
def write(
@@ -228,4 +236,5 @@ def write(
228236
send_voices=not permissions.can_send_voice_notes,# TODO
229237
# send_plain:flags.25?true
230238
edit_rank=permissions.can_edit_tag,
239+
send_reactions=permissions.can_send_reactions,
231240
)

0 commit comments

Comments
 (0)