Skip to content

Commit bc39b9c

Browse files
committed
Merge branch 'dev' of https://github.com/KurimuzonAkuma/pyrogram into dev
2 parents aa048fd + 7cab2ad commit bc39b9c

147 files changed

Lines changed: 6196 additions & 1453 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

compiler/api/source/main_api.tl

Lines changed: 89 additions & 22 deletions
Large diffs are not rendered by default.

compiler/docs/compiler.py

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ def get_title_list(s: str) -> list:
260260
get_messages
261261
get_scheduled_messages
262262
get_stickers
263+
get_web_app_link_url
264+
get_web_app_url
263265
mark_checklist_tasks_as_done
264266
get_media_group
265267
get_chat_history
@@ -294,6 +296,8 @@ def get_title_list(s: str) -> list:
294296
send_paid_media
295297
send_paid_reaction
296298
add_to_gifs
299+
approve_suggested_post
300+
decline_suggested_post
297301
add_checklist_tasks
298302
""",
299303
chats="""
@@ -332,6 +336,8 @@ def get_title_list(s: str) -> list:
332336
create_group
333337
create_supergroup
334338
delete_channel
339+
delete_folder_invite_link
340+
get_folder_invite_links
335341
delete_supergroup
336342
delete_user_history
337343
set_slow_mode
@@ -350,7 +356,8 @@ def get_title_list(s: str) -> list:
350356
update_color
351357
update_chat_notifications
352358
toggle_forum_topics
353-
export_folder_link
359+
create_folder_invite_link
360+
get_chats_for_folder_invite_link
354361
get_folders
355362
create_folder
356363
delete_folder
@@ -420,15 +427,27 @@ def get_title_list(s: str) -> list:
420427
payments="""
421428
Payments
422429
apply_gift_code
430+
buy_gift_upgrade
423431
check_gift_code
424432
convert_gift_to_stars
425433
get_available_gifts
426434
get_chat_gifts
427435
get_chat_gifts_count
436+
add_collection_gifts
437+
create_gift_collection
438+
delete_gift_collection
439+
get_gift_collections
440+
remove_collection_gifts
441+
reorder_collection_gifts
442+
reorder_gift_collections
443+
set_gift_collection_name
428444
get_gift_upgrade_preview
429445
get_payment_form
430446
get_stars_balance
447+
get_ton_balance
448+
get_upgraded_gift_value_info
431449
get_upgraded_gift
450+
gift_premium_with_stars
432451
hide_gift
433452
search_gifts_for_resale
434453
send_gift
@@ -513,6 +532,7 @@ def get_title_list(s: str) -> list:
513532
advanced="""
514533
Advanced
515534
invoke
535+
recover_gaps
516536
resolve_peer
517537
save_file
518538
""",
@@ -553,6 +573,7 @@ def get_title_list(s: str) -> list:
553573
set_privacy
554574
get_privacy
555575
set_global_privacy_settings
576+
set_inactive_session_ttl
556577
get_global_privacy_settings
557578
"""
558579
)
@@ -626,6 +647,7 @@ def get_title_list(s: str) -> list:
626647
FoundContacts
627648
PrivacyRule
628649
StoriesStealthMode
650+
UserRating
629651
BotVerification
630652
BusinessBotRights
631653
ChatSettings
@@ -698,7 +720,13 @@ def get_title_list(s: str) -> list:
698720
GiveawayWinners
699721
Invoice
700722
LinkPreviewOptions
723+
GiftCollection
701724
GiftCode
725+
GiftPurchaseLimit
726+
GiftResaleParameters
727+
GiftResalePrice
728+
GiftResalePriceStar
729+
GiftResalePriceTon
702730
GiftUpgradePreview
703731
CheckedGiftCode
704732
ChecklistTask
@@ -708,6 +736,16 @@ def get_title_list(s: str) -> list:
708736
RefundedPayment
709737
ReplyParameters
710738
SuccessfulPayment
739+
SuggestedPostParameters
740+
SuggestedPostInfo
741+
SuggestedPostPaid
742+
SuggestedPostPrice
743+
SuggestedPostPriceStar
744+
SuggestedPostPriceTon
745+
SuggestedPostApprovalFailed
746+
SuggestedPostApproved
747+
SuggestedPostDeclined
748+
SuggestedPostRefunded
711749
TextQuote
712750
PaidMediaInfo
713751
PaidMediaPreview
@@ -723,14 +761,24 @@ def get_title_list(s: str) -> list:
723761
ChatBoost
724762
ContactRegistered
725763
ScreenshotTaken
764+
StarAmount
726765
WriteAccessAllowed
727766
GiftAttribute
728767
StoryView
729768
GiftedPremium
730769
ChatBackground
731770
ChatTheme
732771
GiftedStars
772+
GiftedTon
773+
UpgradedGiftValueInfo
733774
UpgradedGiftAttributeId
775+
UpgradedGiftAttributeIdModel
776+
UpgradedGiftAttributeIdSymbol
777+
UpgradedGiftAttributeIdBackdrop
778+
InputChatPhoto
779+
InputChatPhotoPrevious
780+
InputChatPhotoStatic
781+
InputChatPhotoAnimation
734782
""",
735783
bot_keyboards="""
736784
Bot keyboards
@@ -1009,7 +1057,7 @@ def get_title_list(s: str) -> list:
10091057
Folder.update_color
10101058
Folder.pin_chat
10111059
Folder.remove_chat
1012-
Folder.export_link
1060+
Folder.create_invite_link
10131061
""",
10141062
active_session="""
10151063
ActiveSession
@@ -1024,6 +1072,7 @@ def get_title_list(s: str) -> list:
10241072
Gift.transfer
10251073
Gift.wear
10261074
Gift.buy
1075+
Gift.send
10271076
""",
10281077
animation="""
10291078
Animation
@@ -1097,6 +1146,8 @@ def get_title_list(s: str) -> list:
10971146
PaymentFormType
10981147
StickerType
10991148
MaskPointType
1149+
SuggestedPostRefundReason
1150+
SuggestedPostState
11001151
""",
11011152
)
11021153

compiler/errors/source/400_BAD_REQUEST.tsv

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ DC_ID_INVALID The provided dc_id is invalid.
153153
DH_G_A_INVALID The g_a parameter is invalid.
154154
DOCUMENT_INVALID The specified document is invalid.
155155
EFFECT_ID_INVALID The specified effect id is invalid.
156+
EMAIL_CODE_EMPTY The email code is empty.
156157
EMAIL_HASH_EXPIRED The email hash expired and cannot be used to verify it.
157158
EMAIL_INVALID The specified email is invalid.
158159
EMAIL_NOT_ALLOWED The specified email cannot be used to complete the operation.
@@ -182,6 +183,7 @@ EXTENDED_MEDIA_AMOUNT_INVALID The specified `stars_amount` of the passed [inputM
182183
EXTENDED_MEDIA_PEER_INVALID The specified chat type is invalid.
183184
EXTENDED_MEDIA_TYPE_INVALID The specified extended media type is unsupported.
184185
EXTERNAL_URL_INVALID The external media URL is invalid.
186+
FEATURE_DISABLED This feature is disabled.
185187
FIELD_NAME_EMPTY The field with the name FIELD_NAME is missing.
186188
FIELD_NAME_INVALID The field with the name FIELD_NAME is invalid.
187189
FILE_CONTENT_TYPE_INVALID File content-type is invalid.
@@ -207,6 +209,7 @@ FILE_TITLE_EMPTY An empty file title was specified.
207209
FILE_TOKEN_INVALID The master DC did not accept the `file_token` (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile.
208210
FILTER_ID_INVALID The specified filter ID is invalid.
209211
FILTER_INCLUDE_EMPTY The list of include_peers of the folder is empty.
212+
FILTER_INCLUDE_TOO_MUCH You can't add more chats to this folder.
210213
FILTER_NOT_SUPPORTED The specified filter cannot be used in this context.
211214
FILTER_TITLE_EMPTY The title field of the filter is empty.
212215
FIRSTNAME_INVALID The first name is invalid.
@@ -276,6 +279,7 @@ INVITE_REVOKED_MISSING The action required a chat invite link to be revoked firs
276279
INVITE_SLUG_EMPTY The specified invite slug is empty.
277280
INVITE_SLUG_EXPIRED The specified invite slug has expired.
278281
INVITE_SLUG_INVALID The specified invite slug is invalid.
282+
INVOICE_INVALID The specified invoice is invalid.
279283
INVOICE_PAYLOAD_INVALID The specified invoice payload is invalid.
280284
JOIN_AS_PEER_INVALID The specified peer cannot be used to join a group call.
281285
LANGUAGE_INVALID The specified lang_code is invalid.
@@ -321,6 +325,7 @@ MSG_ID_INVALID The message ID used in the peer was invalid.
321325
MSG_TOO_OLD chat_read_mark_expire_period have passed since the message was sent, read receipts were deleted.
322326
MSG_VOICE_MISSING The message does not contain a voice message.
323327
MSG_WAIT_FAILED A waiting call returned an error.
328+
MTPROTO_CLUSTER_INVALID The MTProto cluster is invalid.
324329
MULTI_MEDIA_TOO_LONG The album contains too many items.
325330
NEW_SALT_INVALID The new salt is invalid.
326331
NEW_SETTINGS_EMPTY No password is set on the current account, and no new password was specified in `new_settings`.
@@ -483,6 +488,7 @@ STARGIFT_MESSAGE_INVALID The provided message for this gift is invalid.
483488
STARGIFT_NOT_FOUND The specified star gift was not found.
484489
STARGIFT_NOT_OWNER You can't control this gift because it doesn't belong to you.
485490
STARGIFT_OWNER_INVALID The specified gift owner is invalid.
491+
STARGIFT_RESELL_CURRENCY_NOT_ALLOWED The currency provided for gift resell is not allowed.
486492
STARGIFT_RESELL_NOT_ALLOWED You can't buy this gift. Someone else may have already bought it or this gift is not for sale.
487493
STARGIFT_RESELL_TOO_EARLY_X A wait of {value} seconds is required to resell this gift.
488494
STARGIFT_SLUG_INVALID The provided star gift slug is invalid (must match the format CollectionName-123).
@@ -530,6 +536,7 @@ STORY_ID_EMPTY You specified no story IDs.
530536
STORY_ID_INVALID The specified story ID is invalid.
531537
STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.
532538
STORY_PERIOD_INVALID The specified story period is invalid for this account.
539+
STORY_PUBLIC_MISSING The story you are trying to access or manipulate is not publicly available.
533540
STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait {value} seconds before posting a new story.
534541
STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait {value} seconds before posting a new story.
535542
SUBSCRIPTION_EXPORT_MISSING You cannot send a [bot subscription invoice](https://core.telegram.org/api/subscriptions#bot-subscriptions) directly, you may only create invoice links using [payments.exportInvoice](https://core.telegram.org/method/payments.exportInvoice).
@@ -607,6 +614,7 @@ USER_KICKED This user was kicked from this chat.
607614
USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact.
608615
USER_NOT_PARTICIPANT You're not a member of this chat.
609616
USER_PUBLIC_MISSING The accounts username is missing.
617+
USER_RIGHTS_MISSING The user rights is missing.
610618
USER_VOLUME_INVALID The specified user volume is invalid.
611619
VENUE_ID_INVALID The specified venue ID is invalid.
612620
VIDEO_CONTENT_TYPE_INVALID The video content type is invalid (i.e.: not streamable).

compiler/errors/source/401_UNAUTHORIZED.tsv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ id message
22
ACTIVE_USER_REQUIRED The method is only available to already activated users.
33
AUTH_KEY_INVALID The specified auth key is invalid.
44
AUTH_KEY_PERM_EMPTY The method is unavailable for temporary authorization keys, not bound to a permanent authorization key.
5-
AUTH_KEY_UNREGISTERED The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). . Delete your session file and login again.
5+
AUTH_KEY_UNREGISTERED The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). Delete your session file and login again.
66
SESSION_EXPIRED The session has expired.
77
SESSION_PASSWORD_NEEDED The two-step verification is enabled, use a password to login.
88
SESSION_REVOKED The authorization has been invalidated, because of the user terminating all sessions.

compiler/errors/source/403_FORBIDDEN.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ TAKEOUT_REQUIRED The method must be invoked inside a [takeout](https://core.tele
4747
USER_BOT_INVALID User accounts must provide the `bot` method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
4848
USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups.
4949
USER_DELETED You can't send this secret message because the other participant deleted their account.
50+
USER_DISALLOWED_STARGIFTS You can't send gifts to this user due to their privacy settings.
5051
USER_INVALID The provided user is invalid.
5152
USER_IS_BLOCKED You were blocked by this user.
5253
USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact.

compiler/errors/source/406_NOT_ACCEPTABLE.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
id message
2+
API_GIFT_RESTRICTED_UPDATE_APP Please update your Telegram app to send this gift.
23
AUTH_KEY_DUPLICATED The same authorization key (session file) was used in more than one place simultaneously, the current session was invalidated by the server for security reasons! You must delete your session file and log in again with your phone number or bot token.
34
BANNED_RIGHTS_INVALID You provided some invalid flags in the banned rights.
45
BOT_PRECHECKOUT_FAILED Bot precheckout is failed.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ dev = [
6767

6868
docs = [
6969
"Sphinx<=8.2.3",
70-
"furo<=2024.8.8",
70+
"furo<=2025.7.19",
7171
"sphinx-autobuild<=2024.10.3",
7272
"sphinx-copybutton<=0.5.2",
73-
"pygments<=2.19.1",
73+
"pygments<=2.19.2",
7474
]
7575

7676
fast = [

pyrogram/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818

19-
__version__ = "2025.07.28"
19+
__version__ = "2025.09.14"
2020
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
2121
__copyright__ = "Copyright (C) 2017-present Dan <https://github.com/delivrance>"
2222

23-
from concurrent.futures.thread import ThreadPoolExecutor
24-
2523

2624
class StopTransmission(Exception):
2725
pass
@@ -38,5 +36,3 @@ class ContinuePropagation(StopAsyncIteration):
3836
from . import raw, types, filters, handlers, enums
3937
from .client import Client
4038
from .sync import idle, compose
41-
42-
crypto_executor = ThreadPoolExecutor(1, thread_name_prefix="CryptoWorker")

0 commit comments

Comments
 (0)