@mtkruto/node 0.19.1 → 0.20.1
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.
- package/esm/3_types.d.ts +1 -0
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +1 -0
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/0_utilities.d.ts +2 -2
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.d.ts +1 -0
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +22 -90
- package/esm/client/5_client.d.ts +8 -1
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +9 -0
- package/esm/tl/0_api.d.ts +90 -19
- package/esm/tl/0_api.d.ts.map +1 -1
- package/esm/tl/0_api.js +151 -42
- package/esm/types/2_chat_settings.d.ts +27 -0
- package/esm/types/2_chat_settings.d.ts.map +1 -0
- package/esm/types/2_chat_settings.js +32 -0
- package/esm/types/5_chat_list_item.d.ts.map +1 -1
- package/esm/types/5_chat_list_item.js +3 -2
- package/package.json +1 -1
- package/script/3_types.d.ts +1 -0
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +1 -0
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/0_utilities.d.ts +2 -2
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.d.ts +1 -0
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +20 -88
- package/script/client/5_client.d.ts +8 -1
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +9 -0
- package/script/tl/0_api.d.ts +90 -19
- package/script/tl/0_api.d.ts.map +1 -1
- package/script/tl/0_api.js +151 -42
- package/script/types/2_chat_settings.d.ts +27 -0
- package/script/types/2_chat_settings.d.ts.map +1 -0
- package/script/types/2_chat_settings.js +35 -0
- package/script/types/5_chat_list_item.d.ts.map +1 -1
- package/script/types/5_chat_list_item.js +3 -2
package/esm/tl/0_api.js
CHANGED
|
@@ -125,7 +125,7 @@ const map = new Map([
|
|
|
125
125
|
[0xB3CEA0E4, "storage.fileMp4"],
|
|
126
126
|
[0x1081464C, "storage.fileWebp"],
|
|
127
127
|
[0xD3BC4B7A, "userEmpty"],
|
|
128
|
-
[
|
|
128
|
+
[0x020B1422, "user"],
|
|
129
129
|
[0x4F11BAE1, "userProfilePhotoEmpty"],
|
|
130
130
|
[0x82D1F706, "userProfilePhoto"],
|
|
131
131
|
[0x09D05049, "userStatusEmpty"],
|
|
@@ -137,7 +137,7 @@ const map = new Map([
|
|
|
137
137
|
[0x29562865, "chatEmpty"],
|
|
138
138
|
[0x41CBF256, "chat"],
|
|
139
139
|
[0x6592A1A7, "chatForbidden"],
|
|
140
|
-
[
|
|
140
|
+
[0x7482147E, "channel"],
|
|
141
141
|
[0x17D493D5, "channelForbidden"],
|
|
142
142
|
[0x2633421B, "chatFull"],
|
|
143
143
|
[0x52D6806B, "channelFull"],
|
|
@@ -149,7 +149,7 @@ const map = new Map([
|
|
|
149
149
|
[0x37C1011C, "chatPhotoEmpty"],
|
|
150
150
|
[0x1C6E1C11, "chatPhoto"],
|
|
151
151
|
[0x90A6CA84, "messageEmpty"],
|
|
152
|
-
[
|
|
152
|
+
[0xEABCDD4D, "message"],
|
|
153
153
|
[0xD3D28540, "messageService"],
|
|
154
154
|
[0x3DED6320, "messageMediaEmpty"],
|
|
155
155
|
[0x695150D7, "messageMediaPhoto"],
|
|
@@ -240,7 +240,7 @@ const map = new Map([
|
|
|
240
240
|
[0x5C467992, "inputNotifyForumTopic"],
|
|
241
241
|
[0xCACB6AE2, "inputPeerNotifySettings"],
|
|
242
242
|
[0x99622C0C, "peerNotifySettings"],
|
|
243
|
-
[
|
|
243
|
+
[0xF47741F7, "peerSettings"],
|
|
244
244
|
[0xA437C3ED, "wallPaper"],
|
|
245
245
|
[0xE0804116, "wallPaperNoFile"],
|
|
246
246
|
[0x58DBCAB8, "inputReportReasonSpam"],
|
|
@@ -253,7 +253,7 @@ const map = new Map([
|
|
|
253
253
|
[0xF5DDD6E7, "inputReportReasonFake"],
|
|
254
254
|
[0x0A8EB2BE, "inputReportReasonIllegalDrugs"],
|
|
255
255
|
[0x9EC7863D, "inputReportReasonPersonalDetails"],
|
|
256
|
-
[
|
|
256
|
+
[0xD2234EA0, "userFull"],
|
|
257
257
|
[0x145ADE0B, "contact"],
|
|
258
258
|
[0xC13E3C50, "importedContact"],
|
|
259
259
|
[0x16D9703B, "contactStatus"],
|
|
@@ -513,6 +513,7 @@ const map = new Map([
|
|
|
513
513
|
[0x3823CC40, "inputPrivacyKeyAbout"],
|
|
514
514
|
[0xD65A11CC, "inputPrivacyKeyBirthday"],
|
|
515
515
|
[0xE1732341, "inputPrivacyKeyStarGiftsAutoSave"],
|
|
516
|
+
[0xBDC597B4, "inputPrivacyKeyNoPaidMessages"],
|
|
516
517
|
[0xBC2EAB30, "privacyKeyStatusTimestamp"],
|
|
517
518
|
[0x500E6DFA, "privacyKeyChatInvite"],
|
|
518
519
|
[0x3D662B7B, "privacyKeyPhoneCall"],
|
|
@@ -525,6 +526,7 @@ const map = new Map([
|
|
|
525
526
|
[0xA486B761, "privacyKeyAbout"],
|
|
526
527
|
[0x2000A518, "privacyKeyBirthday"],
|
|
527
528
|
[0x2CA4FDF8, "privacyKeyStarGiftsAutoSave"],
|
|
529
|
+
[0x17D348D2, "privacyKeyNoPaidMessages"],
|
|
528
530
|
[0x0D09E07B, "inputPrivacyValueAllowContacts"],
|
|
529
531
|
[0x184B35CE, "inputPrivacyValueAllowAll"],
|
|
530
532
|
[0x131CC67F, "inputPrivacyValueAllowUsers"],
|
|
@@ -1080,7 +1082,7 @@ const map = new Map([
|
|
|
1080
1082
|
[0xD7584C87, "statsGroupTopAdmin"],
|
|
1081
1083
|
[0x535F779D, "statsGroupTopInviter"],
|
|
1082
1084
|
[0xEF7FF916, "stats.megagroupStats"],
|
|
1083
|
-
[
|
|
1085
|
+
[0xC9D8DF1C, "globalPrivacySettings"],
|
|
1084
1086
|
[0x4203C5EF, "help.countryCode"],
|
|
1085
1087
|
[0xC3878E23, "help.country"],
|
|
1086
1088
|
[0x93CC1F32, "help.countriesListNotModified"],
|
|
@@ -1184,6 +1186,7 @@ const map = new Map([
|
|
|
1184
1186
|
[0xE8625E92, "inputInvoiceStarGift"],
|
|
1185
1187
|
[0x4D818D5D, "inputInvoiceStarGiftUpgrade"],
|
|
1186
1188
|
[0x4A5F5BD9, "inputInvoiceStarGiftTransfer"],
|
|
1189
|
+
[0xDABAB2EF, "inputInvoicePremiumGiftStars"],
|
|
1187
1190
|
[0xAED0CBD9, "payments.exportedInvoice"],
|
|
1188
1191
|
[0xCFB9D957, "messages.transcribedAudio"],
|
|
1189
1192
|
[0x5334759C, "help.premiumPromo"],
|
|
@@ -1194,7 +1197,6 @@ const map = new Map([
|
|
|
1194
1197
|
[0xDDDD0F56, "inputStorePaymentStarsTopup"],
|
|
1195
1198
|
[0x1D741EF7, "inputStorePaymentStarsGift"],
|
|
1196
1199
|
[0x751F08FA, "inputStorePaymentStarsGiveaway"],
|
|
1197
|
-
[0x74C34319, "premiumGiftOption"],
|
|
1198
1200
|
[0x88F8F21B, "paymentFormMethod"],
|
|
1199
1201
|
[0x2DE11AAE, "emojiStatusEmpty"],
|
|
1200
1202
|
[0xE7FF068A, "emojiStatus"],
|
|
@@ -1404,7 +1406,7 @@ const map = new Map([
|
|
|
1404
1406
|
[0x60682812, "starsTransactionPeerAds"],
|
|
1405
1407
|
[0xF9677AAD, "starsTransactionPeerAPI"],
|
|
1406
1408
|
[0x0BD915C0, "starsTopupOption"],
|
|
1407
|
-
[
|
|
1409
|
+
[0xA39FD94A, "starsTransaction"],
|
|
1408
1410
|
[0x6C9CE8ED, "payments.starsStatus"],
|
|
1409
1411
|
[0xE87ACBC0, "foundStory"],
|
|
1410
1412
|
[0xE2DE7737, "stories.foundStories"],
|
|
@@ -1460,6 +1462,10 @@ const map = new Map([
|
|
|
1460
1462
|
[0x206AD49E, "paidReactionPrivacyDefault"],
|
|
1461
1463
|
[0x1F0C1AD9, "paidReactionPrivacyAnonymous"],
|
|
1462
1464
|
[0xDC6CFCF0, "paidReactionPrivacyPeer"],
|
|
1465
|
+
[0x1E109708, "account.paidMessagesRevenue"],
|
|
1466
|
+
[0x050A9839, "requirementToContactEmpty"],
|
|
1467
|
+
[0xE581E4E9, "requirementToContactPremium"],
|
|
1468
|
+
[0xB4F67E93, "requirementToContactPaidMessages"],
|
|
1463
1469
|
]);
|
|
1464
1470
|
export const getTypeName = map.get.bind(map);
|
|
1465
1471
|
export const flags = Symbol();
|
|
@@ -1708,8 +1714,8 @@ const enums = new Map([
|
|
|
1708
1714
|
["NotifyPeer", ["notifyPeer", "notifyUsers", "notifyChats", "notifyBroadcasts", "notifyForumTopic"]],
|
|
1709
1715
|
["SendMessageAction", ["sendMessageTypingAction", "sendMessageCancelAction", "sendMessageRecordVideoAction", "sendMessageUploadVideoAction", "sendMessageRecordAudioAction", "sendMessageUploadAudioAction", "sendMessageUploadPhotoAction", "sendMessageUploadDocumentAction", "sendMessageGeoLocationAction", "sendMessageChooseContactAction", "sendMessageGamePlayAction", "sendMessageRecordRoundAction", "sendMessageUploadRoundAction", "speakingInGroupCallAction", "sendMessageHistoryImportAction", "sendMessageChooseStickerAction", "sendMessageEmojiInteraction", "sendMessageEmojiInteractionSeen"]],
|
|
1710
1716
|
["contacts.Found", ["contacts.found"]],
|
|
1711
|
-
["InputPrivacyKey", ["inputPrivacyKeyStatusTimestamp", "inputPrivacyKeyChatInvite", "inputPrivacyKeyPhoneCall", "inputPrivacyKeyPhoneP2P", "inputPrivacyKeyForwards", "inputPrivacyKeyProfilePhoto", "inputPrivacyKeyPhoneNumber", "inputPrivacyKeyAddedByPhone", "inputPrivacyKeyVoiceMessages", "inputPrivacyKeyAbout", "inputPrivacyKeyBirthday", "inputPrivacyKeyStarGiftsAutoSave"]],
|
|
1712
|
-
["PrivacyKey", ["privacyKeyStatusTimestamp", "privacyKeyChatInvite", "privacyKeyPhoneCall", "privacyKeyPhoneP2P", "privacyKeyForwards", "privacyKeyProfilePhoto", "privacyKeyPhoneNumber", "privacyKeyAddedByPhone", "privacyKeyVoiceMessages", "privacyKeyAbout", "privacyKeyBirthday", "privacyKeyStarGiftsAutoSave"]],
|
|
1717
|
+
["InputPrivacyKey", ["inputPrivacyKeyStatusTimestamp", "inputPrivacyKeyChatInvite", "inputPrivacyKeyPhoneCall", "inputPrivacyKeyPhoneP2P", "inputPrivacyKeyForwards", "inputPrivacyKeyProfilePhoto", "inputPrivacyKeyPhoneNumber", "inputPrivacyKeyAddedByPhone", "inputPrivacyKeyVoiceMessages", "inputPrivacyKeyAbout", "inputPrivacyKeyBirthday", "inputPrivacyKeyStarGiftsAutoSave", "inputPrivacyKeyNoPaidMessages"]],
|
|
1718
|
+
["PrivacyKey", ["privacyKeyStatusTimestamp", "privacyKeyChatInvite", "privacyKeyPhoneCall", "privacyKeyPhoneP2P", "privacyKeyForwards", "privacyKeyProfilePhoto", "privacyKeyPhoneNumber", "privacyKeyAddedByPhone", "privacyKeyVoiceMessages", "privacyKeyAbout", "privacyKeyBirthday", "privacyKeyStarGiftsAutoSave", "privacyKeyNoPaidMessages"]],
|
|
1713
1719
|
["InputPrivacyRule", ["inputPrivacyValueAllowContacts", "inputPrivacyValueAllowAll", "inputPrivacyValueAllowUsers", "inputPrivacyValueDisallowContacts", "inputPrivacyValueDisallowAll", "inputPrivacyValueDisallowUsers", "inputPrivacyValueAllowChatParticipants", "inputPrivacyValueDisallowChatParticipants", "inputPrivacyValueAllowCloseFriends", "inputPrivacyValueAllowPremium", "inputPrivacyValueAllowBots", "inputPrivacyValueDisallowBots"]],
|
|
1714
1720
|
["PrivacyRule", ["privacyValueAllowContacts", "privacyValueAllowAll", "privacyValueAllowUsers", "privacyValueDisallowContacts", "privacyValueDisallowAll", "privacyValueDisallowUsers", "privacyValueAllowChatParticipants", "privacyValueDisallowChatParticipants", "privacyValueAllowCloseFriends", "privacyValueAllowPremium", "privacyValueAllowBots", "privacyValueDisallowBots"]],
|
|
1715
1721
|
["account.PrivacyRules", ["account.privacyRules"]],
|
|
@@ -2032,12 +2038,11 @@ const enums = new Map([
|
|
|
2032
2038
|
["NotificationSound", ["notificationSoundDefault", "notificationSoundNone", "notificationSoundLocal", "notificationSoundRingtone"]],
|
|
2033
2039
|
["account.SavedRingtone", ["account.savedRingtone", "account.savedRingtoneConverted"]],
|
|
2034
2040
|
["AttachMenuPeerType", ["attachMenuPeerTypeSameBotPM", "attachMenuPeerTypeBotPM", "attachMenuPeerTypePM", "attachMenuPeerTypeChat", "attachMenuPeerTypeBroadcast"]],
|
|
2035
|
-
["InputInvoice", ["inputInvoiceMessage", "inputInvoiceSlug", "inputInvoicePremiumGiftCode", "inputInvoiceStars", "inputInvoiceChatInviteSubscription", "inputInvoiceStarGift", "inputInvoiceStarGiftUpgrade", "inputInvoiceStarGiftTransfer"]],
|
|
2041
|
+
["InputInvoice", ["inputInvoiceMessage", "inputInvoiceSlug", "inputInvoicePremiumGiftCode", "inputInvoiceStars", "inputInvoiceChatInviteSubscription", "inputInvoiceStarGift", "inputInvoiceStarGiftUpgrade", "inputInvoiceStarGiftTransfer", "inputInvoicePremiumGiftStars"]],
|
|
2036
2042
|
["payments.ExportedInvoice", ["payments.exportedInvoice"]],
|
|
2037
2043
|
["messages.TranscribedAudio", ["messages.transcribedAudio"]],
|
|
2038
2044
|
["help.PremiumPromo", ["help.premiumPromo"]],
|
|
2039
2045
|
["InputStorePaymentPurpose", ["inputStorePaymentPremiumSubscription", "inputStorePaymentGiftPremium", "inputStorePaymentPremiumGiftCode", "inputStorePaymentPremiumGiveaway", "inputStorePaymentStarsTopup", "inputStorePaymentStarsGift", "inputStorePaymentStarsGiveaway"]],
|
|
2040
|
-
["PremiumGiftOption", ["premiumGiftOption"]],
|
|
2041
2046
|
["PaymentFormMethod", ["paymentFormMethod"]],
|
|
2042
2047
|
["EmojiStatus", ["emojiStatusEmpty", "emojiStatus", "emojiStatusCollectible", "inputEmojiStatusCollectible"]],
|
|
2043
2048
|
["account.EmojiStatuses", ["account.emojiStatusesNotModified", "account.emojiStatuses"]],
|
|
@@ -2216,6 +2221,8 @@ const enums = new Map([
|
|
|
2216
2221
|
["InputSavedStarGift", ["inputSavedStarGiftUser", "inputSavedStarGiftChat"]],
|
|
2217
2222
|
["payments.StarGiftWithdrawalUrl", ["payments.starGiftWithdrawalUrl"]],
|
|
2218
2223
|
["PaidReactionPrivacy", ["paidReactionPrivacyDefault", "paidReactionPrivacyAnonymous", "paidReactionPrivacyPeer"]],
|
|
2224
|
+
["account.PaidMessagesRevenue", ["account.paidMessagesRevenue"]],
|
|
2225
|
+
["RequirementToContact", ["requirementToContactEmpty", "requirementToContactPremium", "requirementToContactPaidMessages"]],
|
|
2219
2226
|
]);
|
|
2220
2227
|
const types = new Map([
|
|
2221
2228
|
[
|
|
@@ -3316,7 +3323,7 @@ const types = new Map([
|
|
|
3316
3323
|
[
|
|
3317
3324
|
"user",
|
|
3318
3325
|
[
|
|
3319
|
-
|
|
3326
|
+
0x020B1422,
|
|
3320
3327
|
[
|
|
3321
3328
|
["flags", flags, "#"],
|
|
3322
3329
|
["self", "true", "flags.10?true"],
|
|
@@ -3364,6 +3371,7 @@ const types = new Map([
|
|
|
3364
3371
|
["profile_color", "PeerColor", "flags2.9?PeerColor"],
|
|
3365
3372
|
["bot_active_users", "number", "flags2.12?int"],
|
|
3366
3373
|
["bot_verification_icon", "bigint", "flags2.14?long"],
|
|
3374
|
+
["send_paid_messages_stars", "bigint", "flags2.15?long"],
|
|
3367
3375
|
],
|
|
3368
3376
|
],
|
|
3369
3377
|
],
|
|
@@ -3489,7 +3497,7 @@ const types = new Map([
|
|
|
3489
3497
|
[
|
|
3490
3498
|
"channel",
|
|
3491
3499
|
[
|
|
3492
|
-
|
|
3500
|
+
0x7482147E,
|
|
3493
3501
|
[
|
|
3494
3502
|
["flags", flags, "#"],
|
|
3495
3503
|
["creator", "true", "flags.0?true"],
|
|
@@ -3536,6 +3544,7 @@ const types = new Map([
|
|
|
3536
3544
|
["level", "number", "flags2.10?int"],
|
|
3537
3545
|
["subscription_until_date", "number", "flags2.11?int"],
|
|
3538
3546
|
["bot_verification_icon", "bigint", "flags2.13?long"],
|
|
3547
|
+
["send_paid_messages_stars", "bigint", "flags2.14?long"],
|
|
3539
3548
|
],
|
|
3540
3549
|
],
|
|
3541
3550
|
],
|
|
@@ -3610,6 +3619,7 @@ const types = new Map([
|
|
|
3610
3619
|
["can_view_stars_revenue", "true", "flags2.15?true"],
|
|
3611
3620
|
["paid_reactions_available", "true", "flags2.16?true"],
|
|
3612
3621
|
["stargifts_available", "true", "flags2.19?true"],
|
|
3622
|
+
["paid_messages_available", "true", "flags2.20?true"],
|
|
3613
3623
|
["id", "bigint", "long"],
|
|
3614
3624
|
["about", "string", "string"],
|
|
3615
3625
|
["participants_count", "number", "flags.0?int"],
|
|
@@ -3743,7 +3753,7 @@ const types = new Map([
|
|
|
3743
3753
|
[
|
|
3744
3754
|
"message",
|
|
3745
3755
|
[
|
|
3746
|
-
|
|
3756
|
+
0xEABCDD4D,
|
|
3747
3757
|
[
|
|
3748
3758
|
["flags", flags, "#"],
|
|
3749
3759
|
["out", "true", "flags.1?true"],
|
|
@@ -3787,6 +3797,7 @@ const types = new Map([
|
|
|
3787
3797
|
["effect", "bigint", "flags2.2?long"],
|
|
3788
3798
|
["factcheck", "FactCheck", "flags2.3?FactCheck"],
|
|
3789
3799
|
["report_delivery_until_date", "number", "flags2.5?int"],
|
|
3800
|
+
["paid_message_stars", "bigint", "flags2.6?long"],
|
|
3790
3801
|
],
|
|
3791
3802
|
],
|
|
3792
3803
|
],
|
|
@@ -4420,7 +4431,7 @@ const types = new Map([
|
|
|
4420
4431
|
[
|
|
4421
4432
|
["flags", flags, "#"],
|
|
4422
4433
|
["via_giveaway", "true", "flags.0?true"],
|
|
4423
|
-
["unclaimed", "true", "flags.
|
|
4434
|
+
["unclaimed", "true", "flags.5?true"],
|
|
4424
4435
|
["boost_peer", "Peer", "flags.1?Peer"],
|
|
4425
4436
|
["months", "number", "int"],
|
|
4426
4437
|
["slug", "string", "string"],
|
|
@@ -4845,7 +4856,7 @@ const types = new Map([
|
|
|
4845
4856
|
[
|
|
4846
4857
|
"peerSettings",
|
|
4847
4858
|
[
|
|
4848
|
-
|
|
4859
|
+
0xF47741F7,
|
|
4849
4860
|
[
|
|
4850
4861
|
["flags", flags, "#"],
|
|
4851
4862
|
["report_spam", "true", "flags.0?true"],
|
|
@@ -4864,6 +4875,11 @@ const types = new Map([
|
|
|
4864
4875
|
["request_chat_date", "number", "flags.9?int"],
|
|
4865
4876
|
["business_bot_id", "bigint", "flags.13?long"],
|
|
4866
4877
|
["business_bot_manage_url", "string", "flags.13?string"],
|
|
4878
|
+
["charge_paid_message_stars", "bigint", "flags.14?long"],
|
|
4879
|
+
["registration_month", "string", "flags.15?string"],
|
|
4880
|
+
["phone_country", "string", "flags.16?string"],
|
|
4881
|
+
["name_change_date", "number", "flags.17?int"],
|
|
4882
|
+
["photo_change_date", "number", "flags.18?int"],
|
|
4867
4883
|
],
|
|
4868
4884
|
],
|
|
4869
4885
|
],
|
|
@@ -4971,7 +4987,7 @@ const types = new Map([
|
|
|
4971
4987
|
[
|
|
4972
4988
|
"userFull",
|
|
4973
4989
|
[
|
|
4974
|
-
|
|
4990
|
+
0xD2234EA0,
|
|
4975
4991
|
[
|
|
4976
4992
|
["flags", flags, "#"],
|
|
4977
4993
|
["blocked", "true", "flags.0?true"],
|
|
@@ -5007,7 +5023,6 @@ const types = new Map([
|
|
|
5007
5023
|
["private_forward_name", "string", "flags.16?string"],
|
|
5008
5024
|
["bot_group_admin_rights", "ChatAdminRights", "flags.17?ChatAdminRights"],
|
|
5009
5025
|
["bot_broadcast_admin_rights", "ChatAdminRights", "flags.18?ChatAdminRights"],
|
|
5010
|
-
["premium_gifts", ["PremiumGiftOption"], "flags.19?Vector<PremiumGiftOption>"],
|
|
5011
5026
|
["wallpaper", "WallPaper", "flags.24?WallPaper"],
|
|
5012
5027
|
["stories", "PeerStories", "flags.25?PeerStories"],
|
|
5013
5028
|
["business_work_hours", "BusinessWorkHours", "flags2.0?BusinessWorkHours"],
|
|
@@ -5021,6 +5036,7 @@ const types = new Map([
|
|
|
5021
5036
|
["stargifts_count", "number", "flags2.8?int"],
|
|
5022
5037
|
["starref_program", "StarRefProgram", "flags2.11?StarRefProgram"],
|
|
5023
5038
|
["bot_verification", "BotVerification", "flags2.12?BotVerification"],
|
|
5039
|
+
["send_paid_messages_stars", "bigint", "flags2.14?long"],
|
|
5024
5040
|
],
|
|
5025
5041
|
],
|
|
5026
5042
|
],
|
|
@@ -7757,6 +7773,13 @@ const types = new Map([
|
|
|
7757
7773
|
[],
|
|
7758
7774
|
],
|
|
7759
7775
|
],
|
|
7776
|
+
[
|
|
7777
|
+
"inputPrivacyKeyNoPaidMessages",
|
|
7778
|
+
[
|
|
7779
|
+
0xBDC597B4,
|
|
7780
|
+
[],
|
|
7781
|
+
],
|
|
7782
|
+
],
|
|
7760
7783
|
[
|
|
7761
7784
|
"privacyKeyStatusTimestamp",
|
|
7762
7785
|
[
|
|
@@ -7841,6 +7864,13 @@ const types = new Map([
|
|
|
7841
7864
|
[],
|
|
7842
7865
|
],
|
|
7843
7866
|
],
|
|
7867
|
+
[
|
|
7868
|
+
"privacyKeyNoPaidMessages",
|
|
7869
|
+
[
|
|
7870
|
+
0x17D348D2,
|
|
7871
|
+
[],
|
|
7872
|
+
],
|
|
7873
|
+
],
|
|
7844
7874
|
[
|
|
7845
7875
|
"inputPrivacyValueAllowContacts",
|
|
7846
7876
|
[
|
|
@@ -13847,7 +13877,7 @@ const types = new Map([
|
|
|
13847
13877
|
[
|
|
13848
13878
|
"globalPrivacySettings",
|
|
13849
13879
|
[
|
|
13850
|
-
|
|
13880
|
+
0xC9D8DF1C,
|
|
13851
13881
|
[
|
|
13852
13882
|
["flags", flags, "#"],
|
|
13853
13883
|
["archive_and_mute_new_noncontact_peers", "true", "flags.0?true"],
|
|
@@ -13855,6 +13885,7 @@ const types = new Map([
|
|
|
13855
13885
|
["keep_archived_folders", "true", "flags.2?true"],
|
|
13856
13886
|
["hide_read_marks", "true", "flags.3?true"],
|
|
13857
13887
|
["new_noncontact_peers_require_premium", "true", "flags.4?true"],
|
|
13888
|
+
["noncontact_peers_paid_stars", "bigint", "flags.5?long"],
|
|
13858
13889
|
],
|
|
13859
13890
|
],
|
|
13860
13891
|
],
|
|
@@ -14964,6 +14995,18 @@ const types = new Map([
|
|
|
14964
14995
|
],
|
|
14965
14996
|
],
|
|
14966
14997
|
],
|
|
14998
|
+
[
|
|
14999
|
+
"inputInvoicePremiumGiftStars",
|
|
15000
|
+
[
|
|
15001
|
+
0xDABAB2EF,
|
|
15002
|
+
[
|
|
15003
|
+
["flags", flags, "#"],
|
|
15004
|
+
["user_id", "InputUser", "InputUser"],
|
|
15005
|
+
["months", "number", "int"],
|
|
15006
|
+
["message", "TextWithEntities", "flags.0?TextWithEntities"],
|
|
15007
|
+
],
|
|
15008
|
+
],
|
|
15009
|
+
],
|
|
14967
15010
|
[
|
|
14968
15011
|
"payments.exportedInvoice",
|
|
14969
15012
|
[
|
|
@@ -15100,20 +15143,6 @@ const types = new Map([
|
|
|
15100
15143
|
],
|
|
15101
15144
|
],
|
|
15102
15145
|
],
|
|
15103
|
-
[
|
|
15104
|
-
"premiumGiftOption",
|
|
15105
|
-
[
|
|
15106
|
-
0x74C34319,
|
|
15107
|
-
[
|
|
15108
|
-
["flags", flags, "#"],
|
|
15109
|
-
["months", "number", "int"],
|
|
15110
|
-
["currency", "string", "string"],
|
|
15111
|
-
["amount", "bigint", "long"],
|
|
15112
|
-
["bot_url", "string", "string"],
|
|
15113
|
-
["store_product", "string", "flags.0?string"],
|
|
15114
|
-
],
|
|
15115
|
-
],
|
|
15116
|
-
],
|
|
15117
15146
|
[
|
|
15118
15147
|
"paymentFormMethod",
|
|
15119
15148
|
[
|
|
@@ -17471,7 +17500,7 @@ const types = new Map([
|
|
|
17471
17500
|
[
|
|
17472
17501
|
"starsTransaction",
|
|
17473
17502
|
[
|
|
17474
|
-
|
|
17503
|
+
0xA39FD94A,
|
|
17475
17504
|
[
|
|
17476
17505
|
["flags", flags, "#"],
|
|
17477
17506
|
["refund", "true", "flags.3?true"],
|
|
@@ -17499,6 +17528,8 @@ const types = new Map([
|
|
|
17499
17528
|
["starref_commission_permille", "number", "flags.16?int"],
|
|
17500
17529
|
["starref_peer", "Peer", "flags.17?Peer"],
|
|
17501
17530
|
["starref_amount", "StarsAmount", "flags.17?StarsAmount"],
|
|
17531
|
+
["paid_messages", "number", "flags.19?int"],
|
|
17532
|
+
["premium_gift_months", "number", "flags.20?int"],
|
|
17502
17533
|
],
|
|
17503
17534
|
],
|
|
17504
17535
|
],
|
|
@@ -18080,6 +18111,7 @@ const types = new Map([
|
|
|
18080
18111
|
["unsaved", "true", "flags.5?true"],
|
|
18081
18112
|
["refunded", "true", "flags.9?true"],
|
|
18082
18113
|
["can_upgrade", "true", "flags.10?true"],
|
|
18114
|
+
["pinned_to_top", "true", "flags.12?true"],
|
|
18083
18115
|
["from_id", "Peer", "flags.1?Peer"],
|
|
18084
18116
|
["date", "number", "int"],
|
|
18085
18117
|
["gift", "StarGift", "StarGift"],
|
|
@@ -18159,6 +18191,38 @@ const types = new Map([
|
|
|
18159
18191
|
],
|
|
18160
18192
|
],
|
|
18161
18193
|
],
|
|
18194
|
+
[
|
|
18195
|
+
"account.paidMessagesRevenue",
|
|
18196
|
+
[
|
|
18197
|
+
0x1E109708,
|
|
18198
|
+
[
|
|
18199
|
+
["stars_amount", "bigint", "long"],
|
|
18200
|
+
],
|
|
18201
|
+
],
|
|
18202
|
+
],
|
|
18203
|
+
[
|
|
18204
|
+
"requirementToContactEmpty",
|
|
18205
|
+
[
|
|
18206
|
+
0x050A9839,
|
|
18207
|
+
[],
|
|
18208
|
+
],
|
|
18209
|
+
],
|
|
18210
|
+
[
|
|
18211
|
+
"requirementToContactPremium",
|
|
18212
|
+
[
|
|
18213
|
+
0xE581E4E9,
|
|
18214
|
+
[],
|
|
18215
|
+
],
|
|
18216
|
+
],
|
|
18217
|
+
[
|
|
18218
|
+
"requirementToContactPaidMessages",
|
|
18219
|
+
[
|
|
18220
|
+
0xB4F67E93,
|
|
18221
|
+
[
|
|
18222
|
+
["stars_amount", "bigint", "long"],
|
|
18223
|
+
],
|
|
18224
|
+
],
|
|
18225
|
+
],
|
|
18162
18226
|
[
|
|
18163
18227
|
"req_pq_multi",
|
|
18164
18228
|
[
|
|
@@ -19726,6 +19790,26 @@ const types = new Map([
|
|
|
19726
19790
|
],
|
|
19727
19791
|
],
|
|
19728
19792
|
],
|
|
19793
|
+
[
|
|
19794
|
+
"account.addNoPaidMessagesException",
|
|
19795
|
+
[
|
|
19796
|
+
0x6F688AA7,
|
|
19797
|
+
[
|
|
19798
|
+
["flags", flags, "#"],
|
|
19799
|
+
["refund_charged", "true", "flags.0?true"],
|
|
19800
|
+
["user_id", "InputUser", "InputUser"],
|
|
19801
|
+
],
|
|
19802
|
+
],
|
|
19803
|
+
],
|
|
19804
|
+
[
|
|
19805
|
+
"account.getPaidMessagesRevenue",
|
|
19806
|
+
[
|
|
19807
|
+
0xF1266F38,
|
|
19808
|
+
[
|
|
19809
|
+
["user_id", "InputUser", "InputUser"],
|
|
19810
|
+
],
|
|
19811
|
+
],
|
|
19812
|
+
],
|
|
19729
19813
|
[
|
|
19730
19814
|
"users.getUsers",
|
|
19731
19815
|
[
|
|
@@ -19755,9 +19839,9 @@ const types = new Map([
|
|
|
19755
19839
|
],
|
|
19756
19840
|
],
|
|
19757
19841
|
[
|
|
19758
|
-
"users.
|
|
19842
|
+
"users.getRequirementsToContact",
|
|
19759
19843
|
[
|
|
19760
|
-
|
|
19844
|
+
0xD89A83A3,
|
|
19761
19845
|
[
|
|
19762
19846
|
["id", ["InputUser"], "Vector<InputUser>"],
|
|
19763
19847
|
],
|
|
@@ -20150,7 +20234,7 @@ const types = new Map([
|
|
|
20150
20234
|
[
|
|
20151
20235
|
"messages.sendMessage",
|
|
20152
20236
|
[
|
|
20153
|
-
|
|
20237
|
+
0xFBF2340A,
|
|
20154
20238
|
[
|
|
20155
20239
|
["flags", flags, "#"],
|
|
20156
20240
|
["no_webpage", "true", "flags.1?true"],
|
|
@@ -20171,13 +20255,14 @@ const types = new Map([
|
|
|
20171
20255
|
["send_as", "InputPeer", "flags.13?InputPeer"],
|
|
20172
20256
|
["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
|
|
20173
20257
|
["effect", "bigint", "flags.18?long"],
|
|
20258
|
+
["allow_paid_stars", "bigint", "flags.21?long"],
|
|
20174
20259
|
],
|
|
20175
20260
|
],
|
|
20176
20261
|
],
|
|
20177
20262
|
[
|
|
20178
20263
|
"messages.sendMedia",
|
|
20179
20264
|
[
|
|
20180
|
-
|
|
20265
|
+
0xA550CD78,
|
|
20181
20266
|
[
|
|
20182
20267
|
["flags", flags, "#"],
|
|
20183
20268
|
["silent", "true", "flags.5?true"],
|
|
@@ -20198,13 +20283,14 @@ const types = new Map([
|
|
|
20198
20283
|
["send_as", "InputPeer", "flags.13?InputPeer"],
|
|
20199
20284
|
["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
|
|
20200
20285
|
["effect", "bigint", "flags.18?long"],
|
|
20286
|
+
["allow_paid_stars", "bigint", "flags.21?long"],
|
|
20201
20287
|
],
|
|
20202
20288
|
],
|
|
20203
20289
|
],
|
|
20204
20290
|
[
|
|
20205
20291
|
"messages.forwardMessages",
|
|
20206
20292
|
[
|
|
20207
|
-
|
|
20293
|
+
0xBB9FA475,
|
|
20208
20294
|
[
|
|
20209
20295
|
["flags", flags, "#"],
|
|
20210
20296
|
["silent", "true", "flags.5?true"],
|
|
@@ -20223,6 +20309,7 @@ const types = new Map([
|
|
|
20223
20309
|
["send_as", "InputPeer", "flags.13?InputPeer"],
|
|
20224
20310
|
["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
|
|
20225
20311
|
["video_timestamp", "number", "flags.20?int"],
|
|
20312
|
+
["allow_paid_stars", "bigint", "flags.21?long"],
|
|
20226
20313
|
],
|
|
20227
20314
|
],
|
|
20228
20315
|
],
|
|
@@ -20690,7 +20777,7 @@ const types = new Map([
|
|
|
20690
20777
|
[
|
|
20691
20778
|
"messages.sendInlineBotResult",
|
|
20692
20779
|
[
|
|
20693
|
-
|
|
20780
|
+
0xC0CF7646,
|
|
20694
20781
|
[
|
|
20695
20782
|
["flags", flags, "#"],
|
|
20696
20783
|
["silent", "true", "flags.5?true"],
|
|
@@ -20705,6 +20792,7 @@ const types = new Map([
|
|
|
20705
20792
|
["schedule_date", "number", "flags.10?int"],
|
|
20706
20793
|
["send_as", "InputPeer", "flags.13?InputPeer"],
|
|
20707
20794
|
["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
|
|
20795
|
+
["allow_paid_stars", "bigint", "flags.21?long"],
|
|
20708
20796
|
],
|
|
20709
20797
|
],
|
|
20710
20798
|
],
|
|
@@ -21106,7 +21194,7 @@ const types = new Map([
|
|
|
21106
21194
|
[
|
|
21107
21195
|
"messages.sendMultiMedia",
|
|
21108
21196
|
[
|
|
21109
|
-
|
|
21197
|
+
0x1BF89D74,
|
|
21110
21198
|
[
|
|
21111
21199
|
["flags", flags, "#"],
|
|
21112
21200
|
["silent", "true", "flags.5?true"],
|
|
@@ -21123,6 +21211,7 @@ const types = new Map([
|
|
|
21123
21211
|
["send_as", "InputPeer", "flags.13?InputPeer"],
|
|
21124
21212
|
["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
|
|
21125
21213
|
["effect", "bigint", "flags.18?long"],
|
|
21214
|
+
["allow_paid_stars", "bigint", "flags.21?long"],
|
|
21126
21215
|
],
|
|
21127
21216
|
],
|
|
21128
21217
|
],
|
|
@@ -23661,6 +23750,16 @@ const types = new Map([
|
|
|
23661
23750
|
],
|
|
23662
23751
|
],
|
|
23663
23752
|
],
|
|
23753
|
+
[
|
|
23754
|
+
"channels.updatePaidMessagesPrice",
|
|
23755
|
+
[
|
|
23756
|
+
0xFC84653F,
|
|
23757
|
+
[
|
|
23758
|
+
["channel", "InputChannel", "InputChannel"],
|
|
23759
|
+
["send_paid_messages_stars", "bigint", "long"],
|
|
23760
|
+
],
|
|
23761
|
+
],
|
|
23762
|
+
],
|
|
23664
23763
|
[
|
|
23665
23764
|
"bots.sendCustomRequest",
|
|
23666
23765
|
[
|
|
@@ -24463,6 +24562,16 @@ const types = new Map([
|
|
|
24463
24562
|
],
|
|
24464
24563
|
],
|
|
24465
24564
|
],
|
|
24565
|
+
[
|
|
24566
|
+
"payments.toggleStarGiftsPinnedToTop",
|
|
24567
|
+
[
|
|
24568
|
+
0x1513E7B0,
|
|
24569
|
+
[
|
|
24570
|
+
["peer", "InputPeer", "InputPeer"],
|
|
24571
|
+
["stargift", ["InputSavedStarGift"], "Vector<InputSavedStarGift>"],
|
|
24572
|
+
],
|
|
24573
|
+
],
|
|
24574
|
+
],
|
|
24466
24575
|
[
|
|
24467
24576
|
"stickers.createStickerSet",
|
|
24468
24577
|
[
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Api } from "../2_tl.js";
|
|
2
|
+
import { User } from "./1_user.js";
|
|
3
|
+
export interface ChatSettings {
|
|
4
|
+
report: boolean;
|
|
5
|
+
addToContacts: boolean;
|
|
6
|
+
block: boolean;
|
|
7
|
+
shareContact: boolean;
|
|
8
|
+
contactsException: boolean;
|
|
9
|
+
reportLocation: boolean;
|
|
10
|
+
unarchive: boolean;
|
|
11
|
+
inviteMembers: boolean;
|
|
12
|
+
channelJoinRequest: boolean;
|
|
13
|
+
businessBotPaused: boolean;
|
|
14
|
+
businessBotCanReply: boolean;
|
|
15
|
+
distance?: number;
|
|
16
|
+
joinRequestChatTitle?: string;
|
|
17
|
+
joinRequestDate?: Date;
|
|
18
|
+
businessBot?: User;
|
|
19
|
+
businessBotUrl?: string;
|
|
20
|
+
messagePrice?: number;
|
|
21
|
+
registrationMonth?: string;
|
|
22
|
+
phoneCountry?: string;
|
|
23
|
+
nameChangeDate?: Date;
|
|
24
|
+
photoChangeDate?: Date;
|
|
25
|
+
}
|
|
26
|
+
export declare function constructChatSettings(settings_: Api.messages_peerSettings): ChatSettings;
|
|
27
|
+
//# sourceMappingURL=2_chat_settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2_chat_settings.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,IAAI,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,GAAG,CAAC,qBAAqB,GAAG,YAAY,CA4BxF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cleanObject, fromUnixTimestamp } from "../1_utilities.js";
|
|
2
|
+
import { is } from "../2_tl.js";
|
|
3
|
+
import { constructUser } from "./1_user.js";
|
|
4
|
+
export function constructChatSettings(settings_) {
|
|
5
|
+
const settings = {
|
|
6
|
+
report: settings_.settings.report_spam || false,
|
|
7
|
+
addToContacts: settings_.settings.add_contact || false,
|
|
8
|
+
block: settings_.settings.block_contact || false,
|
|
9
|
+
shareContact: settings_.settings.share_contact || false,
|
|
10
|
+
contactsException: settings_.settings.need_contacts_exception || false,
|
|
11
|
+
reportLocation: settings_.settings.report_geo || false,
|
|
12
|
+
unarchive: settings_.settings.autoarchived || false,
|
|
13
|
+
inviteMembers: settings_.settings.invite_members || false,
|
|
14
|
+
channelJoinRequest: settings_.settings.request_chat_broadcast || false,
|
|
15
|
+
businessBotPaused: settings_.settings.business_bot_paused || false,
|
|
16
|
+
businessBotCanReply: settings_.settings.business_bot_can_reply || false,
|
|
17
|
+
distance: settings_.settings.geo_distance,
|
|
18
|
+
joinRequestChatTitle: settings_.settings.request_chat_title,
|
|
19
|
+
joinRequestDate: settings_.settings.request_chat_date ? fromUnixTimestamp(settings_.settings.request_chat_date) : undefined,
|
|
20
|
+
businessBotUrl: settings_.settings.business_bot_manage_url,
|
|
21
|
+
messagePrice: settings_.settings.charge_paid_message_stars ? Number(settings_.settings.charge_paid_message_stars) : undefined,
|
|
22
|
+
registrationMonth: settings_.settings.registration_month,
|
|
23
|
+
phoneCountry: settings_.settings.phone_country,
|
|
24
|
+
nameChangeDate: settings_.settings.name_change_date ? fromUnixTimestamp(settings_.settings.name_change_date) : undefined,
|
|
25
|
+
photoChangeDate: settings_.settings.photo_change_date ? fromUnixTimestamp(settings_.settings.photo_change_date) : undefined,
|
|
26
|
+
};
|
|
27
|
+
const bot = settings_.users.find((v) => v.id == settings_.settings.business_bot_id);
|
|
28
|
+
if (is("user", bot)) {
|
|
29
|
+
settings.businessBot = constructUser(bot);
|
|
30
|
+
}
|
|
31
|
+
return cleanObject(settings);
|
|
32
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"5_chat_list_item.d.ts","sourceRoot":"","sources":["../../src/types/5_chat_list_item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"5_chat_list_item.d.ts","sourceRoot":"","sources":["../../src/types/5_chat_list_item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAkC,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAoB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE1E,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;CAC/C;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMrH;AAED,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAenL;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,GAAG,SAAS,GAAG,YAAY,CAOnN;AAED,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,GAAG,SAAS,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAW5L;AAED,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,qBAAqB,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAqBrQ"}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
|
+
import { cleanObject } from "../1_utilities.js";
|
|
21
22
|
import { chatIdToPeer, is, peerToChatId } from "../2_tl.js";
|
|
22
23
|
import { constructChatP } from "./1_chat_p.js";
|
|
23
24
|
import { constructMessage } from "./4_message.js";
|
|
@@ -35,12 +36,12 @@ export async function constructChatListItem(chatId, pinned, lastMessageId, getEn
|
|
|
35
36
|
}
|
|
36
37
|
const lastMessage_ = lastMessageId > 0 ? await getMessage(chatId, lastMessageId) : null;
|
|
37
38
|
const lastMessage = lastMessage_ == null ? undefined : lastMessage_;
|
|
38
|
-
return {
|
|
39
|
+
return cleanObject({
|
|
39
40
|
chat: constructChatP(entity),
|
|
40
41
|
order: getChatListItemOrder(lastMessage, pinned),
|
|
41
42
|
pinned,
|
|
42
43
|
lastMessage,
|
|
43
|
-
};
|
|
44
|
+
});
|
|
44
45
|
}
|
|
45
46
|
export function constructChatListItem2(entity, pinned, lastMessage) {
|
|
46
47
|
return {
|
package/package.json
CHANGED
package/script/3_types.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from "./types/1_video_note.js";
|
|
|
90
90
|
export * from "./types/2_business_connection.js";
|
|
91
91
|
export * from "./types/2_chat.js";
|
|
92
92
|
export * from "./types/2_chat_member.js";
|
|
93
|
+
export * from "./types/2_chat_settings.js";
|
|
93
94
|
export * from "./types/2_chosen_inline_result.js";
|
|
94
95
|
export * from "./types/2_forward_header.js";
|
|
95
96
|
export * from "./types/2_game.js";
|