WPyrogram 2.0.142__py3-none-any.whl → 2.0.144__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {WPyrogram-2.0.142.dist-info → WPyrogram-2.0.144.dist-info}/METADATA +1 -1
- {WPyrogram-2.0.142.dist-info → WPyrogram-2.0.144.dist-info}/RECORD +11 -11
- pyrogram/__init__.py +1 -1
- pyrogram/errors/exceptions/__init__.py +3 -3
- pyrogram/errors/exceptions/all.py +69 -69
- pyrogram/methods/chats/get_forum_topics_by_id.py +19 -14
- {WPyrogram-2.0.142.dist-info → WPyrogram-2.0.144.dist-info}/COPYING +0 -0
- {WPyrogram-2.0.142.dist-info → WPyrogram-2.0.144.dist-info}/COPYING.lesser +0 -0
- {WPyrogram-2.0.142.dist-info → WPyrogram-2.0.144.dist-info}/NOTICE +0 -0
- {WPyrogram-2.0.142.dist-info → WPyrogram-2.0.144.dist-info}/WHEEL +0 -0
- {WPyrogram-2.0.142.dist-info → WPyrogram-2.0.144.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: WPyrogram
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.144
|
|
4
4
|
Summary: Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots - Woto's experimental fork
|
|
5
5
|
Home-page: https://github.com/ALiwoto/WPyrogram
|
|
6
6
|
Download-URL: https://github.com/ALiwoto/WPyrogram
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pyrogram/__init__.py,sha256=
|
|
1
|
+
pyrogram/__init__.py,sha256=GlBcPW52vOFa5HouT9Nr1OfuRO7WzJc1wG9LJCYR32c,1401
|
|
2
2
|
pyrogram/client.py,sha256=kk_bGK_L9x_gI74d4IIcTEX9kf5I3Njm8CJoAGjMlks,50349
|
|
3
3
|
pyrogram/dispatcher.py,sha256=9K7Li90cnJmoW570HL925o7eaRBRN-kv0lsrPxmZcMg,14813
|
|
4
4
|
pyrogram/emoji.py,sha256=ixb3OXR1XpLf3BQpw8kWIpmbQRowRIaFedjdnuzljac,208021
|
|
@@ -46,8 +46,8 @@ pyrogram/enums/stories_privacy_rules.py,sha256=28__QA0xwKwj5nK3W9cKVBZrwzIj7BHDa
|
|
|
46
46
|
pyrogram/enums/user_status.py,sha256=0WEpJJmjfGsJ3CVEhItO3Zc1VP9CBjgZBpxWUOzoFFg,1299
|
|
47
47
|
pyrogram/errors/__init__.py,sha256=Td5_TRqn2Ht6R3ZTxrLJaL_HoaugITxNCsiYEfueqCw,2605
|
|
48
48
|
pyrogram/errors/rpc_error.py,sha256=18YbiYLQ-wKBZJ389SfPpl0pwQMHn4Xzh0leuZ-vuNU,3315
|
|
49
|
-
pyrogram/errors/exceptions/__init__.py,sha256=
|
|
50
|
-
pyrogram/errors/exceptions/all.py,sha256=
|
|
49
|
+
pyrogram/errors/exceptions/__init__.py,sha256=8IO_U12kcZ4iHO_qVUr9HqEYkVtNaJKcge08D7h837g,1066
|
|
50
|
+
pyrogram/errors/exceptions/all.py,sha256=xMdjtc4FITtMBn4bNP8oyWjEpdRoabxQduxkT_KaL_k,27767
|
|
51
51
|
pyrogram/errors/exceptions/bad_request_400.py,sha256=-aDwF2vMFxXcud0xSu4j2hranOixYN9r6sj1OrldQYY,68924
|
|
52
52
|
pyrogram/errors/exceptions/flood_420.py,sha256=-yad_Z0EGZ2grz_52J0OMc2D1IiNyiM32KNOaL6KCb0,2309
|
|
53
53
|
pyrogram/errors/exceptions/forbidden_403.py,sha256=DDHtBdJuMi0VVjKg-z36ZHGKcSCl4942SscPzZ8k7eo,7913
|
|
@@ -139,7 +139,7 @@ pyrogram/methods/chats/get_dialogs.py,sha256=sfDUfWxvC6cOT9BFxur81tr1NeIfbq8szYz
|
|
|
139
139
|
pyrogram/methods/chats/get_dialogs_count.py,sha256=0JagwclwbH6ws3jkMvyGbtjmsYFbWWBTKJUPz43Knjs,2096
|
|
140
140
|
pyrogram/methods/chats/get_folders.py,sha256=YGMNvjrbqipEUJuSpVFDi5GsUv-ucBgEe5adXH2Nokw,3603
|
|
141
141
|
pyrogram/methods/chats/get_forum_topics.py,sha256=AjY3EzZohPtm2ollJVXEn7VGQc-3oICsjdXoDBuTrHY,3284
|
|
142
|
-
pyrogram/methods/chats/get_forum_topics_by_id.py,sha256=
|
|
142
|
+
pyrogram/methods/chats/get_forum_topics_by_id.py,sha256=IyH1hx4ZHXIoUkabEibn6v40lIFLrdK0p8Rb-hhFnaA,3793
|
|
143
143
|
pyrogram/methods/chats/get_nearby_chats.py,sha256=sOoNjQ9qHKzD4UYoVusMM5G65KnqzqpzzwLwByJf6tc,2401
|
|
144
144
|
pyrogram/methods/chats/get_send_as_chats.py,sha256=bY6VQnm3J6nezq5lhaBtPxu5-Co-Ti2sZki2XW5Q8JI,2151
|
|
145
145
|
pyrogram/methods/chats/get_similar_channels.py,sha256=99BNdyr-XbcRUviGXSbjIBJq1vU7hZq9g5vs-JIJt64,2076
|
|
@@ -2955,10 +2955,10 @@ pyrogram/types/user_and_chats/video_chat_ended.py,sha256=J5xTIAMSGDz8_z-EGrKwkoJ
|
|
|
2955
2955
|
pyrogram/types/user_and_chats/video_chat_members_invited.py,sha256=9QhonApJd1XjOeJu9fqx2_u6nIOTZhfXZw_tX9XXxd8,1610
|
|
2956
2956
|
pyrogram/types/user_and_chats/video_chat_scheduled.py,sha256=rUvDXF8r-2MfsAZKAcaWb_UZt5VoHebPjeJXWRDHGSo,1531
|
|
2957
2957
|
pyrogram/types/user_and_chats/video_chat_started.py,sha256=WOAuM_CnkRA-W_Iedx0fIHB9RJ-AsvJIiSF05HzLRdA,1043
|
|
2958
|
-
WPyrogram-2.0.
|
|
2959
|
-
WPyrogram-2.0.
|
|
2960
|
-
WPyrogram-2.0.
|
|
2961
|
-
WPyrogram-2.0.
|
|
2962
|
-
WPyrogram-2.0.
|
|
2963
|
-
WPyrogram-2.0.
|
|
2964
|
-
WPyrogram-2.0.
|
|
2958
|
+
WPyrogram-2.0.144.dist-info/COPYING,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
|
2959
|
+
WPyrogram-2.0.144.dist-info/COPYING.lesser,sha256=pWgb-bBdsU2Gd2kwAXxketnm5W_2u8_fIeWEgojfrxs,7651
|
|
2960
|
+
WPyrogram-2.0.144.dist-info/METADATA,sha256=1LPM4aAU0Y6zeDiAWnnIpnUz5aRZg6CsSjFU6KBTV84,4924
|
|
2961
|
+
WPyrogram-2.0.144.dist-info/NOTICE,sha256=QL3iJdeVh_ZqRZZchyruQic5bYUWdx3yl0OkSUC2PQc,774
|
|
2962
|
+
WPyrogram-2.0.144.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
2963
|
+
WPyrogram-2.0.144.dist-info/top_level.txt,sha256=vS2-tKX7dJ1uKjistE5CoOVbv4yqglA95SK0KFEDwl0,9
|
|
2964
|
+
WPyrogram-2.0.144.dist-info/RECORD,,
|
pyrogram/__init__.py
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
|
17
17
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
|
18
18
|
|
|
19
|
-
__version__ = "2.0.
|
|
19
|
+
__version__ = "2.0.144"
|
|
20
20
|
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
|
|
21
21
|
__copyright__ = "Copyright (C) 2017-present Dan <https://github.com/delivrance>"
|
|
22
22
|
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
|
17
17
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
|
18
18
|
|
|
19
|
-
from .unauthorized_401 import *
|
|
20
|
-
from .forbidden_403 import *
|
|
21
19
|
from .see_other_303 import *
|
|
22
20
|
from .internal_server_error_500 import *
|
|
21
|
+
from .unauthorized_401 import *
|
|
23
22
|
from .service_unavailable_503 import *
|
|
24
|
-
from .not_acceptable_406 import *
|
|
25
23
|
from .bad_request_400 import *
|
|
24
|
+
from .not_acceptable_406 import *
|
|
26
25
|
from .flood_420 import *
|
|
26
|
+
from .forbidden_403 import *
|
|
@@ -19,58 +19,6 @@
|
|
|
19
19
|
count = 505
|
|
20
20
|
|
|
21
21
|
exceptions = {
|
|
22
|
-
401: {
|
|
23
|
-
"_": "Unauthorized",
|
|
24
|
-
"ACTIVE_USER_REQUIRED": "ActiveUserRequired",
|
|
25
|
-
"AUTH_KEY_INVALID": "AuthKeyInvalid",
|
|
26
|
-
"AUTH_KEY_PERM_EMPTY": "AuthKeyPermEmpty",
|
|
27
|
-
"AUTH_KEY_UNREGISTERED": "AuthKeyUnregistered",
|
|
28
|
-
"SESSION_EXPIRED": "SessionExpired",
|
|
29
|
-
"SESSION_PASSWORD_NEEDED": "SessionPasswordNeeded",
|
|
30
|
-
"SESSION_REVOKED": "SessionRevoked",
|
|
31
|
-
"USER_DEACTIVATED": "UserDeactivated",
|
|
32
|
-
"USER_DEACTIVATED_BAN": "UserDeactivatedBan",
|
|
33
|
-
},
|
|
34
|
-
403: {
|
|
35
|
-
"_": "Forbidden",
|
|
36
|
-
"BROADCAST_FORBIDDEN": "BroadcastForbidden",
|
|
37
|
-
"CHANNEL_PUBLIC_GROUP_NA": "ChannelPublicGroupNa",
|
|
38
|
-
"CHAT_ADMIN_INVITE_REQUIRED": "ChatAdminInviteRequired",
|
|
39
|
-
"CHAT_ADMIN_REQUIRED": "ChatAdminRequired",
|
|
40
|
-
"CHAT_FORBIDDEN": "ChatForbidden",
|
|
41
|
-
"CHAT_GUEST_SEND_FORBIDDEN": "ChatGuestSendForbidden",
|
|
42
|
-
"CHAT_SEND_AUDIOS_FORBIDDEN": "ChatSendAudiosForbidden",
|
|
43
|
-
"CHAT_SEND_GAME_FORBIDDEN": "ChatSendGameForbidden",
|
|
44
|
-
"CHAT_SEND_GIFS_FORBIDDEN": "ChatSendGifsForbidden",
|
|
45
|
-
"CHAT_SEND_INLINE_FORBIDDEN": "ChatSendInlineForbidden",
|
|
46
|
-
"CHAT_SEND_MEDIA_FORBIDDEN": "ChatSendMediaForbidden",
|
|
47
|
-
"CHAT_SEND_PHOTOS_FORBIDDEN": "ChatSendPhotosForbidden",
|
|
48
|
-
"CHAT_SEND_PLAIN_FORBIDDEN": "ChatSendPlainForbidden",
|
|
49
|
-
"CHAT_SEND_POLL_FORBIDDEN": "ChatSendPollForbidden",
|
|
50
|
-
"CHAT_SEND_STICKERS_FORBIDDEN": "ChatSendStickersForbidden",
|
|
51
|
-
"CHAT_SEND_VIDEOS_FORBIDDEN": "ChatSendVideosForbidden",
|
|
52
|
-
"CHAT_SEND_VOICES_FORBIDDEN": "ChatSendVoicesForbidden",
|
|
53
|
-
"CHAT_WRITE_FORBIDDEN": "ChatWriteForbidden",
|
|
54
|
-
"EDIT_BOT_INVITE_FORBIDDEN": "EditBotInviteForbidden",
|
|
55
|
-
"GROUPCALL_FORBIDDEN": "GroupcallForbidden",
|
|
56
|
-
"INLINE_BOT_REQUIRED": "InlineBotRequired",
|
|
57
|
-
"LIVE_DISABLED": "LiveDisabled",
|
|
58
|
-
"MESSAGE_AUTHOR_REQUIRED": "MessageAuthorRequired",
|
|
59
|
-
"MESSAGE_DELETE_FORBIDDEN": "MessageDeleteForbidden",
|
|
60
|
-
"POLL_VOTE_REQUIRED": "PollVoteRequired",
|
|
61
|
-
"PREMIUM_ACCOUNT_REQUIRED": "PremiumAccountRequired",
|
|
62
|
-
"PRIVACY_PREMIUM_REQUIRED": "PrivacyPremiumRequired",
|
|
63
|
-
"RIGHT_FORBIDDEN": "RightForbidden",
|
|
64
|
-
"SENSITIVE_CHANGE_FORBIDDEN": "SensitiveChangeForbidden",
|
|
65
|
-
"TAKEOUT_REQUIRED": "TakeoutRequired",
|
|
66
|
-
"USER_BOT_INVALID": "UserBotInvalid",
|
|
67
|
-
"USER_CHANNELS_TOO_MUCH": "UserChannelsTooMuch",
|
|
68
|
-
"USER_INVALID": "UserInvalid",
|
|
69
|
-
"USER_IS_BLOCKED": "UserIsBlocked",
|
|
70
|
-
"USER_NOT_MUTUAL_CONTACT": "UserNotMutualContact",
|
|
71
|
-
"USER_PRIVACY_RESTRICTED": "UserPrivacyRestricted",
|
|
72
|
-
"USER_RESTRICTED": "UserRestricted",
|
|
73
|
-
},
|
|
74
22
|
303: {
|
|
75
23
|
"_": "SeeOther",
|
|
76
24
|
"FILE_MIGRATE_X": "FileMigrate",
|
|
@@ -127,29 +75,24 @@ exceptions = {
|
|
|
127
75
|
"WORKER_BUSY_TOO_LONG_RETRY": "WorkerBusyTooLongRetry",
|
|
128
76
|
"WP_ID_GENERATE_FAILED": "WpIdGenerateFailed",
|
|
129
77
|
},
|
|
78
|
+
401: {
|
|
79
|
+
"_": "Unauthorized",
|
|
80
|
+
"ACTIVE_USER_REQUIRED": "ActiveUserRequired",
|
|
81
|
+
"AUTH_KEY_INVALID": "AuthKeyInvalid",
|
|
82
|
+
"AUTH_KEY_PERM_EMPTY": "AuthKeyPermEmpty",
|
|
83
|
+
"AUTH_KEY_UNREGISTERED": "AuthKeyUnregistered",
|
|
84
|
+
"SESSION_EXPIRED": "SessionExpired",
|
|
85
|
+
"SESSION_PASSWORD_NEEDED": "SessionPasswordNeeded",
|
|
86
|
+
"SESSION_REVOKED": "SessionRevoked",
|
|
87
|
+
"USER_DEACTIVATED": "UserDeactivated",
|
|
88
|
+
"USER_DEACTIVATED_BAN": "UserDeactivatedBan",
|
|
89
|
+
},
|
|
130
90
|
503: {
|
|
131
91
|
"_": "ServiceUnavailable",
|
|
132
92
|
"ApiCallError": "ApiCallError",
|
|
133
93
|
"Timedout": "Timedout",
|
|
134
94
|
"Timeout": "Timeout",
|
|
135
95
|
},
|
|
136
|
-
406: {
|
|
137
|
-
"_": "NotAcceptable",
|
|
138
|
-
"AUTH_KEY_DUPLICATED": "AuthKeyDuplicated",
|
|
139
|
-
"CHANNEL_PRIVATE": "ChannelPrivate",
|
|
140
|
-
"CHANNEL_TOO_LARGE": "ChannelTooLarge",
|
|
141
|
-
"FILEREF_UPGRADE_NEEDED": "FilerefUpgradeNeeded",
|
|
142
|
-
"FRESH_CHANGE_ADMINS_FORBIDDEN": "FreshChangeAdminsForbidden",
|
|
143
|
-
"FRESH_CHANGE_PHONE_FORBIDDEN": "FreshChangePhoneForbidden",
|
|
144
|
-
"FRESH_RESET_AUTHORISATION_FORBIDDEN": "FreshResetAuthorisationForbidden",
|
|
145
|
-
"GIFTCODE_NOT_ALLOWED": "GiftcodeNotAllowed",
|
|
146
|
-
"PHONE_NUMBER_INVALID": "PhoneNumberInvalid",
|
|
147
|
-
"PHONE_PASSWORD_FLOOD": "PhonePasswordFlood",
|
|
148
|
-
"STICKERSET_INVALID": "StickersetInvalid",
|
|
149
|
-
"STICKERSET_OWNER_ANONYMOUS": "StickersetOwnerAnonymous",
|
|
150
|
-
"USERPIC_UPLOAD_REQUIRED": "UserpicUploadRequired",
|
|
151
|
-
"USER_RESTRICTED": "UserRestricted",
|
|
152
|
-
},
|
|
153
96
|
400: {
|
|
154
97
|
"_": "BadRequest",
|
|
155
98
|
"ABOUT_TOO_LONG": "AboutTooLong",
|
|
@@ -538,6 +481,23 @@ exceptions = {
|
|
|
538
481
|
"WEBPAGE_MEDIA_EMPTY": "WebpageMediaEmpty",
|
|
539
482
|
"YOU_BLOCKED_USER": "YouBlockedUser",
|
|
540
483
|
},
|
|
484
|
+
406: {
|
|
485
|
+
"_": "NotAcceptable",
|
|
486
|
+
"AUTH_KEY_DUPLICATED": "AuthKeyDuplicated",
|
|
487
|
+
"CHANNEL_PRIVATE": "ChannelPrivate",
|
|
488
|
+
"CHANNEL_TOO_LARGE": "ChannelTooLarge",
|
|
489
|
+
"FILEREF_UPGRADE_NEEDED": "FilerefUpgradeNeeded",
|
|
490
|
+
"FRESH_CHANGE_ADMINS_FORBIDDEN": "FreshChangeAdminsForbidden",
|
|
491
|
+
"FRESH_CHANGE_PHONE_FORBIDDEN": "FreshChangePhoneForbidden",
|
|
492
|
+
"FRESH_RESET_AUTHORISATION_FORBIDDEN": "FreshResetAuthorisationForbidden",
|
|
493
|
+
"GIFTCODE_NOT_ALLOWED": "GiftcodeNotAllowed",
|
|
494
|
+
"PHONE_NUMBER_INVALID": "PhoneNumberInvalid",
|
|
495
|
+
"PHONE_PASSWORD_FLOOD": "PhonePasswordFlood",
|
|
496
|
+
"STICKERSET_INVALID": "StickersetInvalid",
|
|
497
|
+
"STICKERSET_OWNER_ANONYMOUS": "StickersetOwnerAnonymous",
|
|
498
|
+
"USERPIC_UPLOAD_REQUIRED": "UserpicUploadRequired",
|
|
499
|
+
"USER_RESTRICTED": "UserRestricted",
|
|
500
|
+
},
|
|
541
501
|
420: {
|
|
542
502
|
"_": "Flood",
|
|
543
503
|
"2FA_CONFIRM_WAIT_X": "TwoFaConfirmWait",
|
|
@@ -548,4 +508,44 @@ exceptions = {
|
|
|
548
508
|
"STORY_SEND_FLOOD_X": "StorySendFlood",
|
|
549
509
|
"TAKEOUT_INIT_DELAY_X": "TakeoutInitDelay",
|
|
550
510
|
},
|
|
511
|
+
403: {
|
|
512
|
+
"_": "Forbidden",
|
|
513
|
+
"BROADCAST_FORBIDDEN": "BroadcastForbidden",
|
|
514
|
+
"CHANNEL_PUBLIC_GROUP_NA": "ChannelPublicGroupNa",
|
|
515
|
+
"CHAT_ADMIN_INVITE_REQUIRED": "ChatAdminInviteRequired",
|
|
516
|
+
"CHAT_ADMIN_REQUIRED": "ChatAdminRequired",
|
|
517
|
+
"CHAT_FORBIDDEN": "ChatForbidden",
|
|
518
|
+
"CHAT_GUEST_SEND_FORBIDDEN": "ChatGuestSendForbidden",
|
|
519
|
+
"CHAT_SEND_AUDIOS_FORBIDDEN": "ChatSendAudiosForbidden",
|
|
520
|
+
"CHAT_SEND_GAME_FORBIDDEN": "ChatSendGameForbidden",
|
|
521
|
+
"CHAT_SEND_GIFS_FORBIDDEN": "ChatSendGifsForbidden",
|
|
522
|
+
"CHAT_SEND_INLINE_FORBIDDEN": "ChatSendInlineForbidden",
|
|
523
|
+
"CHAT_SEND_MEDIA_FORBIDDEN": "ChatSendMediaForbidden",
|
|
524
|
+
"CHAT_SEND_PHOTOS_FORBIDDEN": "ChatSendPhotosForbidden",
|
|
525
|
+
"CHAT_SEND_PLAIN_FORBIDDEN": "ChatSendPlainForbidden",
|
|
526
|
+
"CHAT_SEND_POLL_FORBIDDEN": "ChatSendPollForbidden",
|
|
527
|
+
"CHAT_SEND_STICKERS_FORBIDDEN": "ChatSendStickersForbidden",
|
|
528
|
+
"CHAT_SEND_VIDEOS_FORBIDDEN": "ChatSendVideosForbidden",
|
|
529
|
+
"CHAT_SEND_VOICES_FORBIDDEN": "ChatSendVoicesForbidden",
|
|
530
|
+
"CHAT_WRITE_FORBIDDEN": "ChatWriteForbidden",
|
|
531
|
+
"EDIT_BOT_INVITE_FORBIDDEN": "EditBotInviteForbidden",
|
|
532
|
+
"GROUPCALL_FORBIDDEN": "GroupcallForbidden",
|
|
533
|
+
"INLINE_BOT_REQUIRED": "InlineBotRequired",
|
|
534
|
+
"LIVE_DISABLED": "LiveDisabled",
|
|
535
|
+
"MESSAGE_AUTHOR_REQUIRED": "MessageAuthorRequired",
|
|
536
|
+
"MESSAGE_DELETE_FORBIDDEN": "MessageDeleteForbidden",
|
|
537
|
+
"POLL_VOTE_REQUIRED": "PollVoteRequired",
|
|
538
|
+
"PREMIUM_ACCOUNT_REQUIRED": "PremiumAccountRequired",
|
|
539
|
+
"PRIVACY_PREMIUM_REQUIRED": "PrivacyPremiumRequired",
|
|
540
|
+
"RIGHT_FORBIDDEN": "RightForbidden",
|
|
541
|
+
"SENSITIVE_CHANGE_FORBIDDEN": "SensitiveChangeForbidden",
|
|
542
|
+
"TAKEOUT_REQUIRED": "TakeoutRequired",
|
|
543
|
+
"USER_BOT_INVALID": "UserBotInvalid",
|
|
544
|
+
"USER_CHANNELS_TOO_MUCH": "UserChannelsTooMuch",
|
|
545
|
+
"USER_INVALID": "UserInvalid",
|
|
546
|
+
"USER_IS_BLOCKED": "UserIsBlocked",
|
|
547
|
+
"USER_NOT_MUTUAL_CONTACT": "UserNotMutualContact",
|
|
548
|
+
"USER_PRIVACY_RESTRICTED": "UserPrivacyRestricted",
|
|
549
|
+
"USER_RESTRICTED": "UserRestricted",
|
|
550
|
+
},
|
|
551
551
|
}
|
|
@@ -70,30 +70,35 @@ class GetForumTopicsByID:
|
|
|
70
70
|
)
|
|
71
71
|
)
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
topics_list = []
|
|
74
|
+
parsed_messages = {}
|
|
74
75
|
users = {u.id: u for u in getattr(r, "users", [])}
|
|
75
76
|
chats = {c.id: c for c in getattr(r, "chats", [])}
|
|
77
|
+
topics = {t.id: t for t in getattr(r, "topics", [])}
|
|
76
78
|
messages = {m.id: m for m in getattr(r, "messages", [])}
|
|
77
79
|
|
|
78
|
-
for message in messages:
|
|
80
|
+
for message in messages.values():
|
|
79
81
|
if isinstance(message, raw.types.MessageEmpty):
|
|
80
82
|
continue
|
|
81
83
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
try:
|
|
85
|
+
parsed_messages[message.id] = await types.Message._parse(
|
|
86
|
+
client=self,
|
|
87
|
+
message=message,
|
|
88
|
+
users=users,
|
|
89
|
+
chats=chats,
|
|
90
|
+
replies=0,
|
|
91
|
+
from_topic=True if len(topics_list) != 1 else topics_list[topic_ids[0]]
|
|
92
|
+
)
|
|
93
|
+
except: pass
|
|
94
|
+
|
|
95
|
+
for current in topics.values():
|
|
96
|
+
topics_list.append(types.ForumTopic._parse(
|
|
92
97
|
self,
|
|
93
98
|
forum_topic=current,
|
|
94
|
-
messages=
|
|
99
|
+
messages=parsed_messages,
|
|
95
100
|
users=users,
|
|
96
101
|
chats=chats
|
|
97
102
|
))
|
|
98
103
|
|
|
99
|
-
return
|
|
104
|
+
return topics_list if is_iterable else topics_list[0] if topics_list else None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|