@mtkruto/node 0.73.0 → 0.75.0
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/0_errors.d.ts +1 -1
- package/esm/0_errors.d.ts.map +1 -1
- package/esm/3_types.d.ts +1 -1
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +1 -1
- package/esm/client/0_storage_operations.js +2 -2
- package/esm/client/0_utilities.d.ts +1 -1
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +7 -7
- package/esm/client/2_update_manager.js +2 -2
- package/esm/client/3_message_manager.js +2 -2
- package/esm/client/3_video_chat_manager.js +8 -8
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +36 -12
- package/esm/client/4_chat_manager.js +1 -1
- package/esm/client/4_forum_manager.js +15 -15
- package/esm/client/4_poll_manager.js +3 -3
- package/esm/client/5_client.d.ts +3 -3
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +48 -40
- package/esm/tl/0_tl_error.d.ts +1 -0
- package/esm/tl/0_tl_error.d.ts.map +1 -1
- package/esm/tl/0_tl_error.js +1 -0
- package/esm/tl/1_telegram_api.d.ts +210 -86
- package/esm/tl/1_telegram_api.d.ts.map +1 -1
- package/esm/tl/1_telegram_api.js +284 -128
- package/esm/types/1_chat_p.js +3 -3
- package/esm/types/{3_chat_member.d.ts → 2_chat_member.d.ts} +4 -5
- package/esm/types/2_chat_member.d.ts.map +1 -0
- package/esm/types/{3_chat_member.js → 2_chat_member.js} +10 -12
- package/esm/types/2_user.js +1 -1
- package/esm/types/4_chat_member_updated.d.ts +1 -1
- package/esm/types/4_chat_member_updated.d.ts.map +1 -1
- package/esm/types/4_chat_member_updated.js +7 -7
- package/esm/types/4_gift.d.ts +1 -1
- package/esm/types/4_gift.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/0_errors.d.ts +1 -1
- package/script/0_errors.d.ts.map +1 -1
- package/script/3_types.d.ts +1 -1
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +1 -1
- package/script/client/0_storage_operations.js +2 -2
- package/script/client/0_utilities.d.ts +1 -1
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/2_account_manager.js +7 -7
- package/script/client/2_update_manager.js +2 -2
- package/script/client/3_message_manager.js +2 -2
- package/script/client/3_video_chat_manager.js +8 -8
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +36 -12
- package/script/client/4_chat_manager.js +1 -1
- package/script/client/4_forum_manager.js +15 -15
- package/script/client/4_poll_manager.js +3 -3
- package/script/client/5_client.d.ts +3 -3
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +48 -40
- package/script/tl/0_tl_error.d.ts +1 -0
- package/script/tl/0_tl_error.d.ts.map +1 -1
- package/script/tl/0_tl_error.js +1 -0
- package/script/tl/1_telegram_api.d.ts +210 -86
- package/script/tl/1_telegram_api.d.ts.map +1 -1
- package/script/tl/1_telegram_api.js +284 -128
- package/script/types/1_chat_p.js +3 -3
- package/script/types/{3_chat_member.d.ts → 2_chat_member.d.ts} +4 -5
- package/script/types/2_chat_member.d.ts.map +1 -0
- package/script/types/{3_chat_member.js → 2_chat_member.js} +10 -12
- package/script/types/2_user.js +1 -1
- package/script/types/4_chat_member_updated.d.ts +1 -1
- package/script/types/4_chat_member_updated.d.ts.map +1 -1
- package/script/types/4_chat_member_updated.js +7 -7
- package/script/types/4_gift.d.ts +1 -1
- package/script/types/4_gift.d.ts.map +1 -1
- package/esm/types/3_chat_member.d.ts.map +0 -1
- package/script/types/3_chat_member.d.ts.map +0 -1
package/esm/0_errors.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
export declare class MtkrutoError extends Error {
|
|
20
|
+
export declare abstract class MtkrutoError extends Error {
|
|
21
21
|
}
|
|
22
22
|
export declare class ConnectionError extends MtkrutoError {
|
|
23
23
|
constructor(...args: ConstructorParameters<typeof Error>);
|
package/esm/0_errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_errors.d.ts","sourceRoot":"","sources":["../src/0_errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,
|
|
1
|
+
{"version":3,"file":"0_errors.d.ts","sourceRoot":"","sources":["../src/0_errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,8BAAsB,YAAa,SAAQ,KAAK;CAC/C;AAED,qBAAa,eAAgB,SAAQ,YAAY;gBACnC,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,KAAK,CAAC;CAIzD;AAED,qBAAa,WAAY,SAAQ,YAAY;gBAC/B,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,KAAK,CAAC;CAIzD;AAED,qBAAa,UAAW,SAAQ,YAAY;gBAC9B,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,KAAK,CAAC;CAIzD;AAED,qBAAa,cAAe,SAAQ,YAAY;aAClB,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM;CAIzC"}
|
package/esm/3_types.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export * from "./types/1_story_reaction.js";
|
|
|
85
85
|
export * from "./types/1_venue.js";
|
|
86
86
|
export * from "./types/1_video_note.js";
|
|
87
87
|
export * from "./types/1_video.js";
|
|
88
|
+
export * from "./types/2_chat_member.js";
|
|
88
89
|
export * from "./types/2_chat.js";
|
|
89
90
|
export * from "./types/2_inactive_chat.js";
|
|
90
91
|
export * from "./types/2_message_entity.js";
|
|
@@ -101,7 +102,6 @@ export * from "./types/2_story_privacy.js";
|
|
|
101
102
|
export * from "./types/2_successful_payment.js";
|
|
102
103
|
export * from "./types/2_user.js";
|
|
103
104
|
export * from "./types/3_business_connection.js";
|
|
104
|
-
export * from "./types/3_chat_member.js";
|
|
105
105
|
export * from "./types/3_chat_settings.js";
|
|
106
106
|
export * from "./types/3_chosen_inline_result.js";
|
|
107
107
|
export * from "./types/3_forward_header.js";
|
package/esm/3_types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_types.d.ts","sourceRoot":"","sources":["../src/3_types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,C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AChD,cAAc,mBAAmB,CAAC;AAClC,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
|
package/esm/3_types.js
CHANGED
|
@@ -85,6 +85,7 @@ export * from "./types/1_story_reaction.js";
|
|
|
85
85
|
export * from "./types/1_venue.js";
|
|
86
86
|
export * from "./types/1_video_note.js";
|
|
87
87
|
export * from "./types/1_video.js";
|
|
88
|
+
export * from "./types/2_chat_member.js";
|
|
88
89
|
export * from "./types/2_chat.js";
|
|
89
90
|
export * from "./types/2_inactive_chat.js";
|
|
90
91
|
export * from "./types/2_message_entity.js";
|
|
@@ -101,7 +102,6 @@ export * from "./types/2_story_privacy.js";
|
|
|
101
102
|
export * from "./types/2_successful_payment.js";
|
|
102
103
|
export * from "./types/2_user.js";
|
|
103
104
|
export * from "./types/3_business_connection.js";
|
|
104
|
-
export * from "./types/3_chat_member.js";
|
|
105
105
|
export * from "./types/3_chat_settings.js";
|
|
106
106
|
export * from "./types/3_chosen_inline_result.js";
|
|
107
107
|
export * from "./types/3_forward_header.js";
|
|
@@ -429,12 +429,12 @@ export class StorageOperations {
|
|
|
429
429
|
return null;
|
|
430
430
|
}
|
|
431
431
|
assertUser(source) {
|
|
432
|
-
if (this.
|
|
432
|
+
if (this.isBot) {
|
|
433
433
|
throw new InputError(`${source}: not a user client`);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
assertBot(source) {
|
|
437
|
-
if (!this.
|
|
437
|
+
if (!this.isBot) {
|
|
438
438
|
throw new InputError(`${source}: not a bot client`);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
@@ -28,7 +28,7 @@ export declare function checkPollOption(option: string): void;
|
|
|
28
28
|
export declare function checkArray<T>(array: T[], check: (value: T) => void): void;
|
|
29
29
|
export declare function checkCallbackQueryId(id: string): void;
|
|
30
30
|
export declare function checkInlineQueryId(id: string): void;
|
|
31
|
-
export declare function isCdnFunction(value: unknown): value is Api.auth_sendCode | Api.auth_signUp | Api.auth_signIn | Api.auth_logOut | Api.auth_resetAuthorizations | Api.auth_exportAuthorization | Api.auth_importAuthorization | Api.auth_bindTempAuthKey | Api.auth_importBotAuthorization | Api.auth_checkPassword | Api.auth_requestPasswordRecovery | Api.auth_recoverPassword | Api.auth_resendCode | Api.auth_cancelCode | Api.auth_dropTempAuthKeys | Api.auth_exportLoginToken | Api.auth_importLoginToken | Api.auth_acceptLoginToken | Api.auth_checkRecoveryPassword | Api.auth_importWebTokenAuthorization | Api.auth_requestFirebaseSms | Api.auth_resetLoginEmail | Api.auth_reportMissingCode | Api.account_registerDevice | Api.account_unregisterDevice | Api.account_updateNotifySettings | Api.account_getNotifySettings | Api.account_resetNotifySettings | Api.account_updateProfile | Api.account_updateStatus | Api.account_getWallPapers | Api.account_reportPeer | Api.account_checkUsername | Api.account_updateUsername | Api.account_getPrivacy | Api.account_setPrivacy | Api.account_deleteAccount | Api.account_getAccountTTL | Api.account_setAccountTTL | Api.account_sendChangePhoneCode | Api.account_changePhone | Api.account_updateDeviceLocked | Api.account_getAuthorizations | Api.account_resetAuthorization | Api.account_getPassword | Api.account_getPasswordSettings | Api.account_updatePasswordSettings | Api.account_sendConfirmPhoneCode | Api.account_confirmPhone | Api.account_getTmpPassword | Api.account_getWebAuthorizations | Api.account_resetWebAuthorization | Api.account_resetWebAuthorizations | Api.account_getAllSecureValues | Api.account_getSecureValue | Api.account_saveSecureValue | Api.account_deleteSecureValue | Api.account_getAuthorizationForm | Api.account_acceptAuthorization | Api.account_sendVerifyPhoneCode | Api.account_verifyPhone | Api.account_sendVerifyEmailCode | Api.account_verifyEmail | Api.account_initTakeoutSession | Api.account_finishTakeoutSession | Api.account_confirmPasswordEmail | Api.account_resendPasswordEmail | Api.account_cancelPasswordEmail | Api.account_getContactSignUpNotification | Api.account_setContactSignUpNotification | Api.account_getNotifyExceptions | Api.account_getWallPaper | Api.account_uploadWallPaper | Api.account_saveWallPaper | Api.account_installWallPaper | Api.account_resetWallPapers | Api.account_getAutoDownloadSettings | Api.account_saveAutoDownloadSettings | Api.account_uploadTheme | Api.account_createTheme | Api.account_updateTheme | Api.account_saveTheme | Api.account_installTheme | Api.account_getTheme | Api.account_getThemes | Api.account_setContentSettings | Api.account_getContentSettings | Api.account_getMultiWallPapers | Api.account_getGlobalPrivacySettings | Api.account_setGlobalPrivacySettings | Api.account_reportProfilePhoto | Api.account_resetPassword | Api.account_declinePasswordReset | Api.account_getChatThemes | Api.account_setAuthorizationTTL | Api.account_changeAuthorizationSettings | Api.account_getSavedRingtones | Api.account_saveRingtone | Api.account_uploadRingtone | Api.account_updateEmojiStatus | Api.account_getDefaultEmojiStatuses | Api.account_getRecentEmojiStatuses | Api.account_clearRecentEmojiStatuses | Api.account_reorderUsernames | Api.account_toggleUsername | Api.account_getDefaultProfilePhotoEmojis | Api.account_getDefaultGroupPhotoEmojis | Api.account_getAutoSaveSettings | Api.account_saveAutoSaveSettings | Api.account_deleteAutoSaveExceptions | Api.account_invalidateSignInCodes | Api.account_updateColor | Api.account_getDefaultBackgroundEmojis | Api.account_getChannelDefaultEmojiStatuses | Api.account_getChannelRestrictedStatusEmojis | Api.account_updateBusinessWorkHours | Api.account_updateBusinessLocation | Api.account_updateBusinessGreetingMessage | Api.account_updateBusinessAwayMessage | Api.account_updateConnectedBot | Api.account_getConnectedBots | Api.account_getBotBusinessConnection | Api.account_updateBusinessIntro | Api.account_toggleConnectedBotPaused | Api.account_disablePeerConnectedBot | Api.account_updateBirthday | Api.account_createBusinessChatLink | Api.account_editBusinessChatLink | Api.account_deleteBusinessChatLink | Api.account_getBusinessChatLinks | Api.account_resolveBusinessChatLink | Api.account_updatePersonalChannel | Api.account_toggleSponsoredMessages | Api.account_getReactionsNotifySettings | Api.account_setReactionsNotifySettings | Api.account_getCollectibleEmojiStatuses | Api.account_getPaidMessagesRevenue | Api.account_toggleNoPaidMessagesException | Api.account_setMainProfileTab | Api.account_saveMusic | Api.account_getSavedMusicIds | Api.account_getUniqueGiftChatThemes | Api.users_getUsers | Api.users_getFullUser | Api.users_setSecureValueErrors | Api.users_getRequirementsToContact | Api.users_getSavedMusic | Api.users_getSavedMusicByID | Api.contacts_getContactIDs | Api.contacts_getStatuses | Api.contacts_getContacts | Api.contacts_importContacts | Api.contacts_deleteContacts | Api.contacts_deleteByPhones | Api.contacts_block | Api.contacts_unblock | Api.contacts_getBlocked | Api.contacts_search | Api.contacts_resolveUsername | Api.contacts_getTopPeers | Api.contacts_resetTopPeerRating | Api.contacts_resetSaved | Api.contacts_getSaved | Api.contacts_toggleTopPeers | Api.contacts_addContact | Api.contacts_acceptContact | Api.contacts_getLocated | Api.contacts_blockFromReplies | Api.contacts_resolvePhone | Api.contacts_exportContactToken | Api.contacts_importContactToken | Api.contacts_editCloseFriends | Api.contacts_setBlocked | Api.contacts_getBirthdays | Api.contacts_getSponsoredPeers | Api.messages_getMessages | Api.messages_getDialogs | Api.messages_getHistory | Api.messages_search | Api.messages_readHistory | Api.messages_deleteHistory | Api.messages_deleteMessages | Api.messages_receivedMessages | Api.messages_setTyping | Api.messages_sendMessage | Api.messages_sendMedia | Api.messages_forwardMessages | Api.messages_reportSpam | Api.messages_getPeerSettings | Api.messages_report | Api.messages_getChats | Api.messages_getFullChat | Api.messages_editChatTitle | Api.messages_editChatPhoto | Api.messages_addChatUser | Api.messages_deleteChatUser | Api.messages_createChat | Api.messages_getDhConfig | Api.messages_requestEncryption | Api.messages_acceptEncryption | Api.messages_discardEncryption | Api.messages_setEncryptedTyping | Api.messages_readEncryptedHistory | Api.messages_sendEncrypted | Api.messages_sendEncryptedFile | Api.messages_sendEncryptedService | Api.messages_receivedQueue | Api.messages_reportEncryptedSpam | Api.messages_readMessageContents | Api.messages_getStickers | Api.messages_getAllStickers | Api.messages_getWebPagePreview | Api.messages_exportChatInvite | Api.messages_checkChatInvite | Api.messages_importChatInvite | Api.messages_getStickerSet | Api.messages_installStickerSet | Api.messages_uninstallStickerSet | Api.messages_startBot | Api.messages_getMessagesViews | Api.messages_editChatAdmin | Api.messages_migrateChat | Api.messages_searchGlobal | Api.messages_reorderStickerSets | Api.messages_getDocumentByHash | Api.messages_getSavedGifs | Api.messages_saveGif | Api.messages_getInlineBotResults | Api.messages_setInlineBotResults | Api.messages_sendInlineBotResult | Api.messages_getMessageEditData | Api.messages_editMessage | Api.messages_editInlineBotMessage | Api.messages_getBotCallbackAnswer | Api.messages_setBotCallbackAnswer | Api.messages_getPeerDialogs | Api.messages_saveDraft | Api.messages_getAllDrafts | Api.messages_getFeaturedStickers | Api.messages_readFeaturedStickers | Api.messages_getRecentStickers | Api.messages_saveRecentSticker | Api.messages_clearRecentStickers | Api.messages_getArchivedStickers | Api.messages_getMaskStickers | Api.messages_getAttachedStickers | Api.messages_setGameScore | Api.messages_setInlineGameScore | Api.messages_getGameHighScores | Api.messages_getInlineGameHighScores | Api.messages_getCommonChats | Api.messages_getWebPage | Api.messages_toggleDialogPin | Api.messages_reorderPinnedDialogs | Api.messages_getPinnedDialogs | Api.messages_setBotShippingResults | Api.messages_setBotPrecheckoutResults | Api.messages_uploadMedia | Api.messages_sendScreenshotNotification | Api.messages_getFavedStickers | Api.messages_faveSticker | Api.messages_getUnreadMentions | Api.messages_readMentions | Api.messages_getRecentLocations | Api.messages_sendMultiMedia | Api.messages_uploadEncryptedFile | Api.messages_searchStickerSets | Api.messages_getSplitRanges | Api.messages_markDialogUnread | Api.messages_getDialogUnreadMarks | Api.messages_clearAllDrafts | Api.messages_updatePinnedMessage | Api.messages_sendVote | Api.messages_getPollResults | Api.messages_getOnlines | Api.messages_editChatAbout | Api.messages_editChatDefaultBannedRights | Api.messages_getEmojiKeywords | Api.messages_getEmojiKeywordsDifference | Api.messages_getEmojiKeywordsLanguages | Api.messages_getEmojiURL | Api.messages_getSearchCounters | Api.messages_requestUrlAuth | Api.messages_acceptUrlAuth | Api.messages_hidePeerSettingsBar | Api.messages_getScheduledHistory | Api.messages_getScheduledMessages | Api.messages_sendScheduledMessages | Api.messages_deleteScheduledMessages | Api.messages_getPollVotes | Api.messages_toggleStickerSets | Api.messages_getDialogFilters | Api.messages_getSuggestedDialogFilters | Api.messages_updateDialogFilter | Api.messages_updateDialogFiltersOrder | Api.messages_getOldFeaturedStickers | Api.messages_getReplies | Api.messages_getDiscussionMessage | Api.messages_readDiscussion | Api.messages_unpinAllMessages | Api.messages_deleteChat | Api.messages_deletePhoneCallHistory | Api.messages_checkHistoryImport | Api.messages_initHistoryImport | Api.messages_uploadImportedMedia | Api.messages_startHistoryImport | Api.messages_getExportedChatInvites | Api.messages_getExportedChatInvite | Api.messages_editExportedChatInvite | Api.messages_deleteRevokedExportedChatInvites | Api.messages_deleteExportedChatInvite | Api.messages_getAdminsWithInvites | Api.messages_getChatInviteImporters | Api.messages_setHistoryTTL | Api.messages_checkHistoryImportPeer | Api.messages_setChatTheme | Api.messages_getMessageReadParticipants | Api.messages_getSearchResultsCalendar | Api.messages_getSearchResultsPositions | Api.messages_hideChatJoinRequest | Api.messages_hideAllChatJoinRequests | Api.messages_toggleNoForwards | Api.messages_saveDefaultSendAs | Api.messages_sendReaction | Api.messages_getMessagesReactions | Api.messages_getMessageReactionsList | Api.messages_setChatAvailableReactions | Api.messages_getAvailableReactions | Api.messages_setDefaultReaction | Api.messages_translateText | Api.messages_getUnreadReactions | Api.messages_readReactions | Api.messages_searchSentMedia | Api.messages_getAttachMenuBots | Api.messages_getAttachMenuBot | Api.messages_toggleBotInAttachMenu | Api.messages_requestWebView | Api.messages_prolongWebView | Api.messages_requestSimpleWebView | Api.messages_sendWebViewResultMessage | Api.messages_sendWebViewData | Api.messages_transcribeAudio | Api.messages_rateTranscribedAudio | Api.messages_getCustomEmojiDocuments | Api.messages_getEmojiStickers | Api.messages_getFeaturedEmojiStickers | Api.messages_reportReaction | Api.messages_getTopReactions | Api.messages_getRecentReactions | Api.messages_clearRecentReactions | Api.messages_getExtendedMedia | Api.messages_setDefaultHistoryTTL | Api.messages_getDefaultHistoryTTL | Api.messages_sendBotRequestedPeer | Api.messages_getEmojiGroups | Api.messages_getEmojiStatusGroups | Api.messages_getEmojiProfilePhotoGroups | Api.messages_searchCustomEmoji | Api.messages_togglePeerTranslations | Api.messages_getBotApp | Api.messages_requestAppWebView | Api.messages_setChatWallPaper | Api.messages_searchEmojiStickerSets | Api.messages_getSavedDialogs | Api.messages_getSavedHistory | Api.messages_deleteSavedHistory | Api.messages_getPinnedSavedDialogs | Api.messages_toggleSavedDialogPin | Api.messages_reorderPinnedSavedDialogs | Api.messages_getSavedReactionTags | Api.messages_updateSavedReactionTag | Api.messages_getDefaultTagReactions | Api.messages_getOutboxReadDate | Api.messages_getQuickReplies | Api.messages_reorderQuickReplies | Api.messages_checkQuickReplyShortcut | Api.messages_editQuickReplyShortcut | Api.messages_deleteQuickReplyShortcut | Api.messages_getQuickReplyMessages | Api.messages_sendQuickReplyMessages | Api.messages_deleteQuickReplyMessages | Api.messages_toggleDialogFilterTags | Api.messages_getMyStickers | Api.messages_getEmojiStickerGroups | Api.messages_getAvailableEffects | Api.messages_editFactCheck | Api.messages_deleteFactCheck | Api.messages_getFactCheck | Api.messages_requestMainWebView | Api.messages_sendPaidReaction | Api.messages_togglePaidReactionPrivacy | Api.messages_getPaidReactionPrivacy | Api.messages_viewSponsoredMessage | Api.messages_clickSponsoredMessage | Api.messages_reportSponsoredMessage | Api.messages_getSponsoredMessages | Api.messages_savePreparedInlineMessage | Api.messages_getPreparedInlineMessage | Api.messages_searchStickers | Api.messages_reportMessagesDelivery | Api.messages_getSavedDialogsByID | Api.messages_readSavedHistory | Api.messages_toggleTodoCompleted | Api.messages_appendTodoList | Api.messages_toggleSuggestedPostApproval | Api.updates_getState | Api.updates_getDifference | Api.updates_getChannelDifference | Api.photos_updateProfilePhoto | Api.photos_uploadProfilePhoto | Api.photos_deletePhotos | Api.photos_getUserPhotos | Api.photos_uploadContactProfilePhoto | Api.upload_saveFilePart | Api.upload_getFile | Api.upload_saveBigFilePart | Api.upload_getWebFile | Api.upload_getCdnFile | Api.upload_reuploadCdnFile | Api.upload_getCdnFileHashes | Api.upload_getFileHashes | Api.help_getConfig | Api.help_getNearestDc | Api.help_getAppUpdate | Api.help_getInviteText | Api.help_getSupport | Api.help_setBotUpdatesStatus | Api.help_getCdnConfig | Api.help_getRecentMeUrls | Api.help_getTermsOfServiceUpdate | Api.help_acceptTermsOfService | Api.help_getDeepLinkInfo | Api.help_getAppConfig | Api.help_saveAppLog | Api.help_getPassportConfig | Api.help_getSupportName | Api.help_getUserInfo | Api.help_editUserInfo | Api.help_getPromoData | Api.help_hidePromoData | Api.help_dismissSuggestion | Api.help_getCountriesList | Api.help_getPremiumPromo | Api.help_getPeerColors | Api.help_getPeerProfileColors | Api.help_getTimezonesList | Api.channels_readHistory | Api.channels_deleteMessages | Api.channels_reportSpam | Api.channels_getMessages | Api.channels_getParticipants | Api.channels_getParticipant | Api.channels_getChannels | Api.channels_getFullChannel | Api.channels_createChannel | Api.channels_editAdmin | Api.channels_editTitle | Api.channels_editPhoto | Api.channels_checkUsername | Api.channels_updateUsername | Api.channels_joinChannel | Api.channels_leaveChannel | Api.channels_inviteToChannel | Api.channels_deleteChannel | Api.channels_exportMessageLink | Api.channels_toggleSignatures | Api.channels_getAdminedPublicChannels | Api.channels_editBanned | Api.channels_getAdminLog | Api.channels_setStickers | Api.channels_readMessageContents | Api.channels_deleteHistory | Api.channels_togglePreHistoryHidden | Api.channels_getLeftChannels | Api.channels_getGroupsForDiscussion | Api.channels_setDiscussionGroup | Api.channels_editCreator | Api.channels_editLocation | Api.channels_toggleSlowMode | Api.channels_getInactiveChannels | Api.channels_convertToGigagroup | Api.channels_getSendAs | Api.channels_deleteParticipantHistory | Api.channels_toggleJoinToSend | Api.channels_toggleJoinRequest | Api.channels_reorderUsernames | Api.channels_toggleUsername | Api.channels_deactivateAllUsernames | Api.channels_toggleForum | Api.channels_createForumTopic | Api.channels_getForumTopics | Api.channels_getForumTopicsByID | Api.channels_editForumTopic | Api.channels_updatePinnedForumTopic | Api.channels_deleteTopicHistory | Api.channels_reorderPinnedForumTopics | Api.channels_toggleAntiSpam | Api.channels_reportAntiSpamFalsePositive | Api.channels_toggleParticipantsHidden | Api.channels_updateColor | Api.channels_toggleViewForumAsMessages | Api.channels_getChannelRecommendations | Api.channels_updateEmojiStatus | Api.channels_setBoostsToUnblockRestrictions | Api.channels_setEmojiStickers | Api.channels_restrictSponsoredMessages | Api.channels_searchPosts | Api.channels_updatePaidMessagesPrice | Api.channels_toggleAutotranslation | Api.channels_getMessageAuthor | Api.channels_checkSearchPostsFlood | Api.channels_setMainProfileTab | Api.bots_sendCustomRequest | Api.bots_answerWebhookJSONQuery | Api.bots_setBotCommands | Api.bots_resetBotCommands | Api.bots_getBotCommands | Api.bots_setBotMenuButton | Api.bots_getBotMenuButton | Api.bots_setBotBroadcastDefaultAdminRights | Api.bots_setBotGroupDefaultAdminRights | Api.bots_setBotInfo | Api.bots_getBotInfo | Api.bots_reorderUsernames | Api.bots_toggleUsername | Api.bots_canSendMessage | Api.bots_allowSendMessage | Api.bots_invokeWebViewCustomMethod | Api.bots_getPopularAppBots | Api.bots_addPreviewMedia | Api.bots_editPreviewMedia | Api.bots_deletePreviewMedia | Api.bots_reorderPreviewMedias | Api.bots_getPreviewInfo | Api.bots_getPreviewMedias | Api.bots_updateUserEmojiStatus | Api.bots_toggleUserEmojiStatusPermission | Api.bots_checkDownloadFileParams | Api.bots_getAdminedBots | Api.bots_updateStarRefProgram | Api.bots_setCustomVerification | Api.bots_getBotRecommendations | Api.payments_getPaymentForm | Api.payments_getPaymentReceipt | Api.payments_validateRequestedInfo | Api.payments_sendPaymentForm | Api.payments_getSavedInfo | Api.payments_clearSavedInfo | Api.payments_getBankCardData | Api.payments_exportInvoice | Api.payments_assignAppStoreTransaction | Api.payments_assignPlayMarketTransaction | Api.payments_getPremiumGiftCodeOptions | Api.payments_checkGiftCode | Api.payments_applyGiftCode | Api.payments_getGiveawayInfo | Api.payments_launchPrepaidGiveaway | Api.payments_getStarsTopupOptions | Api.payments_getStarsStatus | Api.payments_getStarsTransactions | Api.payments_sendStarsForm | Api.payments_refundStarsCharge | Api.payments_getStarsRevenueStats | Api.payments_getStarsRevenueWithdrawalUrl | Api.payments_getStarsRevenueAdsAccountUrl | Api.payments_getStarsTransactionsByID | Api.payments_getStarsGiftOptions | Api.payments_getStarsSubscriptions | Api.payments_changeStarsSubscription | Api.payments_fulfillStarsSubscription | Api.payments_getStarsGiveawayOptions | Api.payments_getStarGifts | Api.payments_saveStarGift | Api.payments_convertStarGift | Api.payments_botCancelStarsSubscription | Api.payments_getConnectedStarRefBots | Api.payments_getConnectedStarRefBot | Api.payments_getSuggestedStarRefBots | Api.payments_connectStarRefBot | Api.payments_editConnectedStarRefBot | Api.payments_getStarGiftUpgradePreview | Api.payments_upgradeStarGift | Api.payments_transferStarGift | Api.payments_getUniqueStarGift | Api.payments_getSavedStarGifts | Api.payments_getSavedStarGift | Api.payments_getStarGiftWithdrawalUrl | Api.payments_toggleChatStarGiftNotifications | Api.payments_toggleStarGiftsPinnedToTop | Api.payments_canPurchaseStore | Api.payments_getResaleStarGifts | Api.payments_updateStarGiftPrice | Api.payments_createStarGiftCollection | Api.payments_updateStarGiftCollection | Api.payments_reorderStarGiftCollections | Api.payments_deleteStarGiftCollection | Api.payments_getStarGiftCollections | Api.payments_getUniqueStarGiftValueInfo | Api.payments_checkCanSendGift | Api.stickers_createStickerSet | Api.stickers_removeStickerFromSet | Api.stickers_changeStickerPosition | Api.stickers_addStickerToSet | Api.stickers_setStickerSetThumb | Api.stickers_checkShortName | Api.stickers_suggestShortName | Api.stickers_changeSticker | Api.stickers_renameStickerSet | Api.stickers_deleteStickerSet | Api.stickers_replaceSticker | Api.phone_getCallConfig | Api.phone_requestCall | Api.phone_acceptCall | Api.phone_confirmCall | Api.phone_receivedCall | Api.phone_discardCall | Api.phone_setCallRating | Api.phone_saveCallDebug | Api.phone_sendSignalingData | Api.phone_createGroupCall | Api.phone_joinGroupCall | Api.phone_leaveGroupCall | Api.phone_inviteToGroupCall | Api.phone_discardGroupCall | Api.phone_toggleGroupCallSettings | Api.phone_getGroupCall | Api.phone_getGroupParticipants | Api.phone_checkGroupCall | Api.phone_toggleGroupCallRecord | Api.phone_editGroupCallParticipant | Api.phone_editGroupCallTitle | Api.phone_getGroupCallJoinAs | Api.phone_exportGroupCallInvite | Api.phone_toggleGroupCallStartSubscription | Api.phone_startScheduledGroupCall | Api.phone_saveDefaultGroupCallJoinAs | Api.phone_joinGroupCallPresentation | Api.phone_leaveGroupCallPresentation | Api.phone_getGroupCallStreamChannels | Api.phone_getGroupCallStreamRtmpUrl | Api.phone_saveCallLog | Api.phone_createConferenceCall | Api.phone_deleteConferenceCallParticipants | Api.phone_sendConferenceCallBroadcast | Api.phone_inviteConferenceCallParticipant | Api.phone_declineConferenceCallInvite | Api.phone_getGroupCallChainBlocks | Api.langpack_getLangPack | Api.langpack_getStrings | Api.langpack_getDifference | Api.langpack_getLanguages | Api.langpack_getLanguage | Api.folders_editPeerFolders | Api.stats_getBroadcastStats | Api.stats_loadAsyncGraph | Api.stats_getMegagroupStats | Api.stats_getMessagePublicForwards | Api.stats_getMessageStats | Api.stats_getStoryStats | Api.stats_getStoryPublicForwards | Api.chatlists_exportChatlistInvite | Api.chatlists_deleteExportedInvite | Api.chatlists_editExportedInvite | Api.chatlists_getExportedInvites | Api.chatlists_checkChatlistInvite | Api.chatlists_joinChatlistInvite | Api.chatlists_getChatlistUpdates | Api.chatlists_joinChatlistUpdates | Api.chatlists_hideChatlistUpdates | Api.chatlists_getLeaveChatlistSuggestions | Api.chatlists_leaveChatlist | Api.stories_canSendStory | Api.stories_sendStory | Api.stories_editStory | Api.stories_deleteStories | Api.stories_togglePinned | Api.stories_getAllStories | Api.stories_getPinnedStories | Api.stories_getStoriesArchive | Api.stories_getStoriesByID | Api.stories_toggleAllStoriesHidden | Api.stories_readStories | Api.stories_incrementStoryViews | Api.stories_getStoryViewsList | Api.stories_getStoriesViews | Api.stories_exportStoryLink | Api.stories_report | Api.stories_activateStealthMode | Api.stories_sendReaction | Api.stories_getPeerStories | Api.stories_getAllReadPeerStories | Api.stories_getPeerMaxIDs | Api.stories_getChatsToSend | Api.stories_togglePeerStoriesHidden | Api.stories_getStoryReactionsList | Api.stories_togglePinnedToTop | Api.stories_searchPosts | Api.stories_createAlbum | Api.stories_updateAlbum | Api.stories_reorderAlbums | Api.stories_deleteAlbum | Api.stories_getAlbums | Api.stories_getAlbumStories | Api.premium_getBoostsList | Api.premium_getMyBoosts | Api.premium_applyBoost | Api.premium_getBoostsStatus | Api.premium_getUserBoosts | Api.smsjobs_isEligibleToJoin | Api.smsjobs_join | Api.smsjobs_leave | Api.smsjobs_updateSettings | Api.smsjobs_getStatus | Api.smsjobs_getSmsJob | Api.smsjobs_finishJob | Api.fragment_getCollectibleInfo | Api.invokeAfterMsg<Api.Function> | Api.invokeAfterMsgs<Api.Function> | Api.initConnection<Api.Function> | Api.invokeWithLayer<Api.Function> | Api.invokeWithoutUpdates<Api.Function> | Api.invokeWithMessagesRange<Api.Function> | Api.invokeWithTakeout<Api.Function> | Api.invokeWithBusinessConnection<Api.Function> | Api.invokeWithGooglePlayIntegrity<Api.Function> | Api.invokeWithApnsSecret<Api.Function> | Api.invokeWithReCaptcha<Api.Function>;
|
|
31
|
+
export declare function isCdnFunction(value: unknown): value is Api.auth_sendCode | Api.auth_signUp | Api.auth_signIn | Api.auth_logOut | Api.auth_resetAuthorizations | Api.auth_exportAuthorization | Api.auth_importAuthorization | Api.auth_bindTempAuthKey | Api.auth_importBotAuthorization | Api.auth_checkPassword | Api.auth_requestPasswordRecovery | Api.auth_recoverPassword | Api.auth_resendCode | Api.auth_cancelCode | Api.auth_dropTempAuthKeys | Api.auth_exportLoginToken | Api.auth_importLoginToken | Api.auth_acceptLoginToken | Api.auth_checkRecoveryPassword | Api.auth_importWebTokenAuthorization | Api.auth_requestFirebaseSms | Api.auth_resetLoginEmail | Api.auth_reportMissingCode | Api.auth_checkPaidAuth | Api.account_registerDevice | Api.account_unregisterDevice | Api.account_updateNotifySettings | Api.account_getNotifySettings | Api.account_resetNotifySettings | Api.account_updateProfile | Api.account_updateStatus | Api.account_getWallPapers | Api.account_reportPeer | Api.account_checkUsername | Api.account_updateUsername | Api.account_getPrivacy | Api.account_setPrivacy | Api.account_deleteAccount | Api.account_getAccountTTL | Api.account_setAccountTTL | Api.account_sendChangePhoneCode | Api.account_changePhone | Api.account_updateDeviceLocked | Api.account_getAuthorizations | Api.account_resetAuthorization | Api.account_getPassword | Api.account_getPasswordSettings | Api.account_updatePasswordSettings | Api.account_sendConfirmPhoneCode | Api.account_confirmPhone | Api.account_getTmpPassword | Api.account_getWebAuthorizations | Api.account_resetWebAuthorization | Api.account_resetWebAuthorizations | Api.account_getAllSecureValues | Api.account_getSecureValue | Api.account_saveSecureValue | Api.account_deleteSecureValue | Api.account_getAuthorizationForm | Api.account_acceptAuthorization | Api.account_sendVerifyPhoneCode | Api.account_verifyPhone | Api.account_sendVerifyEmailCode | Api.account_verifyEmail | Api.account_initTakeoutSession | Api.account_finishTakeoutSession | Api.account_confirmPasswordEmail | Api.account_resendPasswordEmail | Api.account_cancelPasswordEmail | Api.account_getContactSignUpNotification | Api.account_setContactSignUpNotification | Api.account_getNotifyExceptions | Api.account_getWallPaper | Api.account_uploadWallPaper | Api.account_saveWallPaper | Api.account_installWallPaper | Api.account_resetWallPapers | Api.account_getAutoDownloadSettings | Api.account_saveAutoDownloadSettings | Api.account_uploadTheme | Api.account_createTheme | Api.account_updateTheme | Api.account_saveTheme | Api.account_installTheme | Api.account_getTheme | Api.account_getThemes | Api.account_setContentSettings | Api.account_getContentSettings | Api.account_getMultiWallPapers | Api.account_getGlobalPrivacySettings | Api.account_setGlobalPrivacySettings | Api.account_reportProfilePhoto | Api.account_resetPassword | Api.account_declinePasswordReset | Api.account_getChatThemes | Api.account_setAuthorizationTTL | Api.account_changeAuthorizationSettings | Api.account_getSavedRingtones | Api.account_saveRingtone | Api.account_uploadRingtone | Api.account_updateEmojiStatus | Api.account_getDefaultEmojiStatuses | Api.account_getRecentEmojiStatuses | Api.account_clearRecentEmojiStatuses | Api.account_reorderUsernames | Api.account_toggleUsername | Api.account_getDefaultProfilePhotoEmojis | Api.account_getDefaultGroupPhotoEmojis | Api.account_getAutoSaveSettings | Api.account_saveAutoSaveSettings | Api.account_deleteAutoSaveExceptions | Api.account_invalidateSignInCodes | Api.account_updateColor | Api.account_getDefaultBackgroundEmojis | Api.account_getChannelDefaultEmojiStatuses | Api.account_getChannelRestrictedStatusEmojis | Api.account_updateBusinessWorkHours | Api.account_updateBusinessLocation | Api.account_updateBusinessGreetingMessage | Api.account_updateBusinessAwayMessage | Api.account_updateConnectedBot | Api.account_getConnectedBots | Api.account_getBotBusinessConnection | Api.account_updateBusinessIntro | Api.account_toggleConnectedBotPaused | Api.account_disablePeerConnectedBot | Api.account_updateBirthday | Api.account_createBusinessChatLink | Api.account_editBusinessChatLink | Api.account_deleteBusinessChatLink | Api.account_getBusinessChatLinks | Api.account_resolveBusinessChatLink | Api.account_updatePersonalChannel | Api.account_toggleSponsoredMessages | Api.account_getReactionsNotifySettings | Api.account_setReactionsNotifySettings | Api.account_getCollectibleEmojiStatuses | Api.account_getPaidMessagesRevenue | Api.account_toggleNoPaidMessagesException | Api.account_setMainProfileTab | Api.account_saveMusic | Api.account_getSavedMusicIds | Api.account_getUniqueGiftChatThemes | Api.users_getUsers | Api.users_getFullUser | Api.users_setSecureValueErrors | Api.users_getRequirementsToContact | Api.users_getSavedMusic | Api.users_getSavedMusicByID | Api.users_suggestBirthday | Api.contacts_getContactIDs | Api.contacts_getStatuses | Api.contacts_getContacts | Api.contacts_importContacts | Api.contacts_deleteContacts | Api.contacts_deleteByPhones | Api.contacts_block | Api.contacts_unblock | Api.contacts_getBlocked | Api.contacts_search | Api.contacts_resolveUsername | Api.contacts_getTopPeers | Api.contacts_resetTopPeerRating | Api.contacts_resetSaved | Api.contacts_getSaved | Api.contacts_toggleTopPeers | Api.contacts_addContact | Api.contacts_acceptContact | Api.contacts_getLocated | Api.contacts_blockFromReplies | Api.contacts_resolvePhone | Api.contacts_exportContactToken | Api.contacts_importContactToken | Api.contacts_editCloseFriends | Api.contacts_setBlocked | Api.contacts_getBirthdays | Api.contacts_getSponsoredPeers | Api.contacts_updateContactNote | Api.messages_getMessages | Api.messages_getDialogs | Api.messages_getHistory | Api.messages_search | Api.messages_readHistory | Api.messages_deleteHistory | Api.messages_deleteMessages | Api.messages_receivedMessages | Api.messages_setTyping | Api.messages_sendMessage | Api.messages_sendMedia | Api.messages_forwardMessages | Api.messages_reportSpam | Api.messages_getPeerSettings | Api.messages_report | Api.messages_getChats | Api.messages_getFullChat | Api.messages_editChatTitle | Api.messages_editChatPhoto | Api.messages_addChatUser | Api.messages_deleteChatUser | Api.messages_createChat | Api.messages_getDhConfig | Api.messages_requestEncryption | Api.messages_acceptEncryption | Api.messages_discardEncryption | Api.messages_setEncryptedTyping | Api.messages_readEncryptedHistory | Api.messages_sendEncrypted | Api.messages_sendEncryptedFile | Api.messages_sendEncryptedService | Api.messages_receivedQueue | Api.messages_reportEncryptedSpam | Api.messages_readMessageContents | Api.messages_getStickers | Api.messages_getAllStickers | Api.messages_getWebPagePreview | Api.messages_exportChatInvite | Api.messages_checkChatInvite | Api.messages_importChatInvite | Api.messages_getStickerSet | Api.messages_installStickerSet | Api.messages_uninstallStickerSet | Api.messages_startBot | Api.messages_getMessagesViews | Api.messages_editChatAdmin | Api.messages_migrateChat | Api.messages_searchGlobal | Api.messages_reorderStickerSets | Api.messages_getDocumentByHash | Api.messages_getSavedGifs | Api.messages_saveGif | Api.messages_getInlineBotResults | Api.messages_setInlineBotResults | Api.messages_sendInlineBotResult | Api.messages_getMessageEditData | Api.messages_editMessage | Api.messages_editInlineBotMessage | Api.messages_getBotCallbackAnswer | Api.messages_setBotCallbackAnswer | Api.messages_getPeerDialogs | Api.messages_saveDraft | Api.messages_getAllDrafts | Api.messages_getFeaturedStickers | Api.messages_readFeaturedStickers | Api.messages_getRecentStickers | Api.messages_saveRecentSticker | Api.messages_clearRecentStickers | Api.messages_getArchivedStickers | Api.messages_getMaskStickers | Api.messages_getAttachedStickers | Api.messages_setGameScore | Api.messages_setInlineGameScore | Api.messages_getGameHighScores | Api.messages_getInlineGameHighScores | Api.messages_getCommonChats | Api.messages_getWebPage | Api.messages_toggleDialogPin | Api.messages_reorderPinnedDialogs | Api.messages_getPinnedDialogs | Api.messages_setBotShippingResults | Api.messages_setBotPrecheckoutResults | Api.messages_uploadMedia | Api.messages_sendScreenshotNotification | Api.messages_getFavedStickers | Api.messages_faveSticker | Api.messages_getUnreadMentions | Api.messages_readMentions | Api.messages_getRecentLocations | Api.messages_sendMultiMedia | Api.messages_uploadEncryptedFile | Api.messages_searchStickerSets | Api.messages_getSplitRanges | Api.messages_markDialogUnread | Api.messages_getDialogUnreadMarks | Api.messages_clearAllDrafts | Api.messages_updatePinnedMessage | Api.messages_sendVote | Api.messages_getPollResults | Api.messages_getOnlines | Api.messages_editChatAbout | Api.messages_editChatDefaultBannedRights | Api.messages_getEmojiKeywords | Api.messages_getEmojiKeywordsDifference | Api.messages_getEmojiKeywordsLanguages | Api.messages_getEmojiURL | Api.messages_getSearchCounters | Api.messages_requestUrlAuth | Api.messages_acceptUrlAuth | Api.messages_hidePeerSettingsBar | Api.messages_getScheduledHistory | Api.messages_getScheduledMessages | Api.messages_sendScheduledMessages | Api.messages_deleteScheduledMessages | Api.messages_getPollVotes | Api.messages_toggleStickerSets | Api.messages_getDialogFilters | Api.messages_getSuggestedDialogFilters | Api.messages_updateDialogFilter | Api.messages_updateDialogFiltersOrder | Api.messages_getOldFeaturedStickers | Api.messages_getReplies | Api.messages_getDiscussionMessage | Api.messages_readDiscussion | Api.messages_unpinAllMessages | Api.messages_deleteChat | Api.messages_deletePhoneCallHistory | Api.messages_checkHistoryImport | Api.messages_initHistoryImport | Api.messages_uploadImportedMedia | Api.messages_startHistoryImport | Api.messages_getExportedChatInvites | Api.messages_getExportedChatInvite | Api.messages_editExportedChatInvite | Api.messages_deleteRevokedExportedChatInvites | Api.messages_deleteExportedChatInvite | Api.messages_getAdminsWithInvites | Api.messages_getChatInviteImporters | Api.messages_setHistoryTTL | Api.messages_checkHistoryImportPeer | Api.messages_setChatTheme | Api.messages_getMessageReadParticipants | Api.messages_getSearchResultsCalendar | Api.messages_getSearchResultsPositions | Api.messages_hideChatJoinRequest | Api.messages_hideAllChatJoinRequests | Api.messages_toggleNoForwards | Api.messages_saveDefaultSendAs | Api.messages_sendReaction | Api.messages_getMessagesReactions | Api.messages_getMessageReactionsList | Api.messages_setChatAvailableReactions | Api.messages_getAvailableReactions | Api.messages_setDefaultReaction | Api.messages_translateText | Api.messages_getUnreadReactions | Api.messages_readReactions | Api.messages_searchSentMedia | Api.messages_getAttachMenuBots | Api.messages_getAttachMenuBot | Api.messages_toggleBotInAttachMenu | Api.messages_requestWebView | Api.messages_prolongWebView | Api.messages_requestSimpleWebView | Api.messages_sendWebViewResultMessage | Api.messages_sendWebViewData | Api.messages_transcribeAudio | Api.messages_rateTranscribedAudio | Api.messages_getCustomEmojiDocuments | Api.messages_getEmojiStickers | Api.messages_getFeaturedEmojiStickers | Api.messages_reportReaction | Api.messages_getTopReactions | Api.messages_getRecentReactions | Api.messages_clearRecentReactions | Api.messages_getExtendedMedia | Api.messages_setDefaultHistoryTTL | Api.messages_getDefaultHistoryTTL | Api.messages_sendBotRequestedPeer | Api.messages_getEmojiGroups | Api.messages_getEmojiStatusGroups | Api.messages_getEmojiProfilePhotoGroups | Api.messages_searchCustomEmoji | Api.messages_togglePeerTranslations | Api.messages_getBotApp | Api.messages_requestAppWebView | Api.messages_setChatWallPaper | Api.messages_searchEmojiStickerSets | Api.messages_getSavedDialogs | Api.messages_getSavedHistory | Api.messages_deleteSavedHistory | Api.messages_getPinnedSavedDialogs | Api.messages_toggleSavedDialogPin | Api.messages_reorderPinnedSavedDialogs | Api.messages_getSavedReactionTags | Api.messages_updateSavedReactionTag | Api.messages_getDefaultTagReactions | Api.messages_getOutboxReadDate | Api.messages_getQuickReplies | Api.messages_reorderQuickReplies | Api.messages_checkQuickReplyShortcut | Api.messages_editQuickReplyShortcut | Api.messages_deleteQuickReplyShortcut | Api.messages_getQuickReplyMessages | Api.messages_sendQuickReplyMessages | Api.messages_deleteQuickReplyMessages | Api.messages_toggleDialogFilterTags | Api.messages_getMyStickers | Api.messages_getEmojiStickerGroups | Api.messages_getAvailableEffects | Api.messages_editFactCheck | Api.messages_deleteFactCheck | Api.messages_getFactCheck | Api.messages_requestMainWebView | Api.messages_sendPaidReaction | Api.messages_togglePaidReactionPrivacy | Api.messages_getPaidReactionPrivacy | Api.messages_viewSponsoredMessage | Api.messages_clickSponsoredMessage | Api.messages_reportSponsoredMessage | Api.messages_getSponsoredMessages | Api.messages_savePreparedInlineMessage | Api.messages_getPreparedInlineMessage | Api.messages_searchStickers | Api.messages_reportMessagesDelivery | Api.messages_getSavedDialogsByID | Api.messages_readSavedHistory | Api.messages_toggleTodoCompleted | Api.messages_appendTodoList | Api.messages_toggleSuggestedPostApproval | Api.messages_getForumTopics | Api.messages_getForumTopicsByID | Api.messages_editForumTopic | Api.messages_updatePinnedForumTopic | Api.messages_reorderPinnedForumTopics | Api.messages_createForumTopic | Api.messages_deleteTopicHistory | Api.updates_getState | Api.updates_getDifference | Api.updates_getChannelDifference | Api.photos_updateProfilePhoto | Api.photos_uploadProfilePhoto | Api.photos_deletePhotos | Api.photos_getUserPhotos | Api.photos_uploadContactProfilePhoto | Api.upload_saveFilePart | Api.upload_getFile | Api.upload_saveBigFilePart | Api.upload_getWebFile | Api.upload_getCdnFile | Api.upload_reuploadCdnFile | Api.upload_getCdnFileHashes | Api.upload_getFileHashes | Api.help_getConfig | Api.help_getNearestDc | Api.help_getAppUpdate | Api.help_getInviteText | Api.help_getSupport | Api.help_setBotUpdatesStatus | Api.help_getCdnConfig | Api.help_getRecentMeUrls | Api.help_getTermsOfServiceUpdate | Api.help_acceptTermsOfService | Api.help_getDeepLinkInfo | Api.help_getAppConfig | Api.help_saveAppLog | Api.help_getPassportConfig | Api.help_getSupportName | Api.help_getUserInfo | Api.help_editUserInfo | Api.help_getPromoData | Api.help_hidePromoData | Api.help_dismissSuggestion | Api.help_getCountriesList | Api.help_getPremiumPromo | Api.help_getPeerColors | Api.help_getPeerProfileColors | Api.help_getTimezonesList | Api.channels_readHistory | Api.channels_deleteMessages | Api.channels_reportSpam | Api.channels_getMessages | Api.channels_getParticipants | Api.channels_getParticipant | Api.channels_getChannels | Api.channels_getFullChannel | Api.channels_createChannel | Api.channels_editAdmin | Api.channels_editTitle | Api.channels_editPhoto | Api.channels_checkUsername | Api.channels_updateUsername | Api.channels_joinChannel | Api.channels_leaveChannel | Api.channels_inviteToChannel | Api.channels_deleteChannel | Api.channels_exportMessageLink | Api.channels_toggleSignatures | Api.channels_getAdminedPublicChannels | Api.channels_editBanned | Api.channels_getAdminLog | Api.channels_setStickers | Api.channels_readMessageContents | Api.channels_deleteHistory | Api.channels_togglePreHistoryHidden | Api.channels_getLeftChannels | Api.channels_getGroupsForDiscussion | Api.channels_setDiscussionGroup | Api.channels_editCreator | Api.channels_editLocation | Api.channels_toggleSlowMode | Api.channels_getInactiveChannels | Api.channels_convertToGigagroup | Api.channels_getSendAs | Api.channels_deleteParticipantHistory | Api.channels_toggleJoinToSend | Api.channels_toggleJoinRequest | Api.channels_reorderUsernames | Api.channels_toggleUsername | Api.channels_deactivateAllUsernames | Api.channels_toggleForum | Api.channels_toggleAntiSpam | Api.channels_reportAntiSpamFalsePositive | Api.channels_toggleParticipantsHidden | Api.channels_updateColor | Api.channels_toggleViewForumAsMessages | Api.channels_getChannelRecommendations | Api.channels_updateEmojiStatus | Api.channels_setBoostsToUnblockRestrictions | Api.channels_setEmojiStickers | Api.channels_restrictSponsoredMessages | Api.channels_searchPosts | Api.channels_updatePaidMessagesPrice | Api.channels_toggleAutotranslation | Api.channels_getMessageAuthor | Api.channels_checkSearchPostsFlood | Api.channels_setMainProfileTab | Api.bots_sendCustomRequest | Api.bots_answerWebhookJSONQuery | Api.bots_setBotCommands | Api.bots_resetBotCommands | Api.bots_getBotCommands | Api.bots_setBotMenuButton | Api.bots_getBotMenuButton | Api.bots_setBotBroadcastDefaultAdminRights | Api.bots_setBotGroupDefaultAdminRights | Api.bots_setBotInfo | Api.bots_getBotInfo | Api.bots_reorderUsernames | Api.bots_toggleUsername | Api.bots_canSendMessage | Api.bots_allowSendMessage | Api.bots_invokeWebViewCustomMethod | Api.bots_getPopularAppBots | Api.bots_addPreviewMedia | Api.bots_editPreviewMedia | Api.bots_deletePreviewMedia | Api.bots_reorderPreviewMedias | Api.bots_getPreviewInfo | Api.bots_getPreviewMedias | Api.bots_updateUserEmojiStatus | Api.bots_toggleUserEmojiStatusPermission | Api.bots_checkDownloadFileParams | Api.bots_getAdminedBots | Api.bots_updateStarRefProgram | Api.bots_setCustomVerification | Api.bots_getBotRecommendations | Api.payments_getPaymentForm | Api.payments_getPaymentReceipt | Api.payments_validateRequestedInfo | Api.payments_sendPaymentForm | Api.payments_getSavedInfo | Api.payments_clearSavedInfo | Api.payments_getBankCardData | Api.payments_exportInvoice | Api.payments_assignAppStoreTransaction | Api.payments_assignPlayMarketTransaction | Api.payments_getPremiumGiftCodeOptions | Api.payments_checkGiftCode | Api.payments_applyGiftCode | Api.payments_getGiveawayInfo | Api.payments_launchPrepaidGiveaway | Api.payments_getStarsTopupOptions | Api.payments_getStarsStatus | Api.payments_getStarsTransactions | Api.payments_sendStarsForm | Api.payments_refundStarsCharge | Api.payments_getStarsRevenueStats | Api.payments_getStarsRevenueWithdrawalUrl | Api.payments_getStarsRevenueAdsAccountUrl | Api.payments_getStarsTransactionsByID | Api.payments_getStarsGiftOptions | Api.payments_getStarsSubscriptions | Api.payments_changeStarsSubscription | Api.payments_fulfillStarsSubscription | Api.payments_getStarsGiveawayOptions | Api.payments_getStarGifts | Api.payments_saveStarGift | Api.payments_convertStarGift | Api.payments_botCancelStarsSubscription | Api.payments_getConnectedStarRefBots | Api.payments_getConnectedStarRefBot | Api.payments_getSuggestedStarRefBots | Api.payments_connectStarRefBot | Api.payments_editConnectedStarRefBot | Api.payments_getStarGiftUpgradePreview | Api.payments_upgradeStarGift | Api.payments_transferStarGift | Api.payments_getUniqueStarGift | Api.payments_getSavedStarGifts | Api.payments_getSavedStarGift | Api.payments_getStarGiftWithdrawalUrl | Api.payments_toggleChatStarGiftNotifications | Api.payments_toggleStarGiftsPinnedToTop | Api.payments_canPurchaseStore | Api.payments_getResaleStarGifts | Api.payments_updateStarGiftPrice | Api.payments_createStarGiftCollection | Api.payments_updateStarGiftCollection | Api.payments_reorderStarGiftCollections | Api.payments_deleteStarGiftCollection | Api.payments_getStarGiftCollections | Api.payments_getUniqueStarGiftValueInfo | Api.payments_checkCanSendGift | Api.stickers_createStickerSet | Api.stickers_removeStickerFromSet | Api.stickers_changeStickerPosition | Api.stickers_addStickerToSet | Api.stickers_setStickerSetThumb | Api.stickers_checkShortName | Api.stickers_suggestShortName | Api.stickers_changeSticker | Api.stickers_renameStickerSet | Api.stickers_deleteStickerSet | Api.stickers_replaceSticker | Api.phone_getCallConfig | Api.phone_requestCall | Api.phone_acceptCall | Api.phone_confirmCall | Api.phone_receivedCall | Api.phone_discardCall | Api.phone_setCallRating | Api.phone_saveCallDebug | Api.phone_sendSignalingData | Api.phone_createGroupCall | Api.phone_joinGroupCall | Api.phone_leaveGroupCall | Api.phone_inviteToGroupCall | Api.phone_discardGroupCall | Api.phone_toggleGroupCallSettings | Api.phone_getGroupCall | Api.phone_getGroupParticipants | Api.phone_checkGroupCall | Api.phone_toggleGroupCallRecord | Api.phone_editGroupCallParticipant | Api.phone_editGroupCallTitle | Api.phone_getGroupCallJoinAs | Api.phone_exportGroupCallInvite | Api.phone_toggleGroupCallStartSubscription | Api.phone_startScheduledGroupCall | Api.phone_saveDefaultGroupCallJoinAs | Api.phone_joinGroupCallPresentation | Api.phone_leaveGroupCallPresentation | Api.phone_getGroupCallStreamChannels | Api.phone_getGroupCallStreamRtmpUrl | Api.phone_saveCallLog | Api.phone_createConferenceCall | Api.phone_deleteConferenceCallParticipants | Api.phone_sendConferenceCallBroadcast | Api.phone_inviteConferenceCallParticipant | Api.phone_declineConferenceCallInvite | Api.phone_getGroupCallChainBlocks | Api.phone_sendGroupCallMessage | Api.phone_sendGroupCallEncryptedMessage | Api.langpack_getLangPack | Api.langpack_getStrings | Api.langpack_getDifference | Api.langpack_getLanguages | Api.langpack_getLanguage | Api.folders_editPeerFolders | Api.stats_getBroadcastStats | Api.stats_loadAsyncGraph | Api.stats_getMegagroupStats | Api.stats_getMessagePublicForwards | Api.stats_getMessageStats | Api.stats_getStoryStats | Api.stats_getStoryPublicForwards | Api.chatlists_exportChatlistInvite | Api.chatlists_deleteExportedInvite | Api.chatlists_editExportedInvite | Api.chatlists_getExportedInvites | Api.chatlists_checkChatlistInvite | Api.chatlists_joinChatlistInvite | Api.chatlists_getChatlistUpdates | Api.chatlists_joinChatlistUpdates | Api.chatlists_hideChatlistUpdates | Api.chatlists_getLeaveChatlistSuggestions | Api.chatlists_leaveChatlist | Api.stories_canSendStory | Api.stories_sendStory | Api.stories_editStory | Api.stories_deleteStories | Api.stories_togglePinned | Api.stories_getAllStories | Api.stories_getPinnedStories | Api.stories_getStoriesArchive | Api.stories_getStoriesByID | Api.stories_toggleAllStoriesHidden | Api.stories_readStories | Api.stories_incrementStoryViews | Api.stories_getStoryViewsList | Api.stories_getStoriesViews | Api.stories_exportStoryLink | Api.stories_report | Api.stories_activateStealthMode | Api.stories_sendReaction | Api.stories_getPeerStories | Api.stories_getAllReadPeerStories | Api.stories_getPeerMaxIDs | Api.stories_getChatsToSend | Api.stories_togglePeerStoriesHidden | Api.stories_getStoryReactionsList | Api.stories_togglePinnedToTop | Api.stories_searchPosts | Api.stories_createAlbum | Api.stories_updateAlbum | Api.stories_reorderAlbums | Api.stories_deleteAlbum | Api.stories_getAlbums | Api.stories_getAlbumStories | Api.premium_getBoostsList | Api.premium_getMyBoosts | Api.premium_applyBoost | Api.premium_getBoostsStatus | Api.premium_getUserBoosts | Api.smsjobs_isEligibleToJoin | Api.smsjobs_join | Api.smsjobs_leave | Api.smsjobs_updateSettings | Api.smsjobs_getStatus | Api.smsjobs_getSmsJob | Api.smsjobs_finishJob | Api.fragment_getCollectibleInfo | Api.invokeAfterMsg<Api.Function> | Api.invokeAfterMsgs<Api.Function> | Api.initConnection<Api.Function> | Api.invokeWithLayer<Api.Function> | Api.invokeWithoutUpdates<Api.Function> | Api.invokeWithMessagesRange<Api.Function> | Api.invokeWithTakeout<Api.Function> | Api.invokeWithBusinessConnection<Api.Function> | Api.invokeWithGooglePlayIntegrity<Api.Function> | Api.invokeWithApnsSecret<Api.Function> | Api.invokeWithReCaptcha<Api.Function>;
|
|
32
32
|
export declare function canBeInputUser(inputPeer: Api.InputPeer): inputPeer is Api.inputPeerSelf | Api.inputPeerUser | Api.inputPeerUserFromMessage;
|
|
33
33
|
export declare function toInputUser(inputPeer: Api.InputPeer): Api.inputUserSelf | Api.inputUser | Api.inputUserFromMessage;
|
|
34
34
|
export declare function canBeInputChannel(inputPeer: Api.InputPeer): inputPeer is Api.inputPeerChannel | Api.inputPeerChannelFromMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_utilities.d.ts","sourceRoot":"","sources":["../../src/client/0_utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAiB,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,OAAO,qBAA0B,CAAC;AAE/C,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,WAMvC;AAsCD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,UAyBzC;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,SAS7C;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,UAK/C;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,UAK3C;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,QAI7C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,QAIlE;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,QAI9C;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,QAI5C;AAYD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO
|
|
1
|
+
{"version":3,"file":"0_utilities.d.ts","sourceRoot":"","sources":["../../src/client/0_utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,E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async #getUserFull(chatId) {
|
|
143
143
|
const inputPeer = await this.#c.getInputPeer(chatId);
|
|
144
144
|
const chatId_ = await this.#c.getInputPeerChatId(inputPeer);
|
|
145
|
-
let fullChat = await this.#c.
|
|
145
|
+
let fullChat = await this.#c.messageStorage.getFullChat(chatId_);
|
|
146
146
|
if (fullChat !== null) {
|
|
147
147
|
if (!Api.is("userFull", fullChat)) {
|
|
148
148
|
unreachable();
|
|
@@ -161,8 +161,8 @@ export class AccountManager {
|
|
|
161
161
|
this.#c.storage.assertUser("updateProfile");
|
|
162
162
|
const selfId = await this.#c.getSelfId();
|
|
163
163
|
const userFull = await this.#getUserFull(selfId);
|
|
164
|
-
const
|
|
165
|
-
if (!
|
|
164
|
+
const peer = this.#c.getPeer(Api.chatIdToPeer(selfId));
|
|
165
|
+
if (!peer || peer[0].type !== "private") {
|
|
166
166
|
unreachable();
|
|
167
167
|
}
|
|
168
168
|
params ??= {};
|
|
@@ -170,13 +170,13 @@ export class AccountManager {
|
|
|
170
170
|
params.firstName = params.firstName.trim();
|
|
171
171
|
}
|
|
172
172
|
else {
|
|
173
|
-
params.firstName =
|
|
173
|
+
params.firstName = peer[0].firstName;
|
|
174
174
|
}
|
|
175
175
|
if (params?.lastName) {
|
|
176
176
|
params.lastName = params.lastName.trim();
|
|
177
177
|
}
|
|
178
178
|
else {
|
|
179
|
-
params.lastName =
|
|
179
|
+
params.lastName = peer[0].lastName;
|
|
180
180
|
}
|
|
181
181
|
if (params?.bio) {
|
|
182
182
|
params.bio = params.bio.trim();
|
|
@@ -205,12 +205,12 @@ export class AccountManager {
|
|
|
205
205
|
async setNameColor(color, params) {
|
|
206
206
|
this.#c.storage.assertUser("setNameColor");
|
|
207
207
|
const background_emoji_id = params?.customEmojiId ? BigInt(params.customEmojiId) : undefined;
|
|
208
|
-
await this.#c.invoke({ _: "account.updateColor", color, background_emoji_id });
|
|
208
|
+
await this.#c.invoke({ _: "account.updateColor", color: { _: "peerColor", color, background_emoji_id } });
|
|
209
209
|
}
|
|
210
210
|
async setProfileColor(color, params) {
|
|
211
211
|
this.#c.storage.assertUser("setProfileColor");
|
|
212
212
|
const background_emoji_id = params?.customEmojiId ? BigInt(params.customEmojiId) : undefined;
|
|
213
|
-
await this.#c.invoke({ _: "account.updateColor", for_profile: true, color, background_emoji_id });
|
|
213
|
+
await this.#c.invoke({ _: "account.updateColor", for_profile: true, color: { _: "peerColor", color, background_emoji_id } });
|
|
214
214
|
}
|
|
215
215
|
async setLocation(params) {
|
|
216
216
|
this.#c.storage.assertUser("setLocation");
|
|
@@ -67,7 +67,7 @@ export class UpdateManager {
|
|
|
67
67
|
return this.#c.dropPendingUpdates;
|
|
68
68
|
}
|
|
69
69
|
if (this.#defaultDropPendingUpdates === null) {
|
|
70
|
-
this.#defaultDropPendingUpdates = this.#c.storage.
|
|
70
|
+
this.#defaultDropPendingUpdates = this.#c.storage.isBot;
|
|
71
71
|
}
|
|
72
72
|
return this.#defaultDropPendingUpdates;
|
|
73
73
|
}
|
|
@@ -687,7 +687,7 @@ export class UpdateManager {
|
|
|
687
687
|
pts,
|
|
688
688
|
channel: { _: "inputChannel", channel_id: channelId, access_hash },
|
|
689
689
|
filter: { _: "channelMessagesFilterEmpty" },
|
|
690
|
-
limit: this.#c.storage.
|
|
690
|
+
limit: this.#c.storage.isBot ? CHANNEL_DIFFERENCE_LIMIT_BOT : CHANNEL_DIFFERENCE_LIMIT_USER,
|
|
691
691
|
});
|
|
692
692
|
lastTimeout = difference.timeout ?? 1;
|
|
693
693
|
}
|
|
@@ -200,10 +200,10 @@ export class MessageManager {
|
|
|
200
200
|
}
|
|
201
201
|
const message = constructMessage_(message_, this.#c.getPeer, this.getMessage.bind(this), this.#c.fileManager.getStickerSetName.bind(this.#c.fileManager), r, business, poll ?? undefined, pollResults ?? undefined);
|
|
202
202
|
if (!poll && mediaPoll) {
|
|
203
|
-
await this.#c.
|
|
203
|
+
await this.#c.messageStorage.setPoll(mediaPoll.poll.id, mediaPoll.poll);
|
|
204
204
|
}
|
|
205
205
|
if (!pollResults && mediaPoll) {
|
|
206
|
-
await this.#c.
|
|
206
|
+
await this.#c.messageStorage.setPollResults(mediaPoll.poll.id, mediaPoll.results);
|
|
207
207
|
}
|
|
208
208
|
return message;
|
|
209
209
|
}
|
|
@@ -55,7 +55,7 @@ export class VideoChatManager {
|
|
|
55
55
|
}
|
|
56
56
|
async #getInputGroupCall(id_) {
|
|
57
57
|
const id = BigInt(id_);
|
|
58
|
-
const accessHash = await this.#c.
|
|
58
|
+
const accessHash = await this.#c.messageStorage.getGroupCallAccessHash(id);
|
|
59
59
|
if (accessHash === null) {
|
|
60
60
|
throw new InputError("Video chat not found.");
|
|
61
61
|
}
|
|
@@ -99,7 +99,7 @@ export class VideoChatManager {
|
|
|
99
99
|
unreachable();
|
|
100
100
|
}
|
|
101
101
|
async #getCall(id) {
|
|
102
|
-
let groupCall = await this.#c.
|
|
102
|
+
let groupCall = await this.#c.messageStorage.getGroupCall(BigInt(id));
|
|
103
103
|
if (groupCall === null) {
|
|
104
104
|
const call = await this.#getInputGroupCall(id);
|
|
105
105
|
groupCall = (await this.#c.invoke({ _: "phone.getGroupCall", call, limit: 1 })).call;
|
|
@@ -118,19 +118,19 @@ export class VideoChatManager {
|
|
|
118
118
|
return null; // TODO: handle updates with unspecified chat_id
|
|
119
119
|
}
|
|
120
120
|
let chatId = Number(-update.chat_id);
|
|
121
|
-
const fullChat = await this.#c.
|
|
121
|
+
const fullChat = await this.#c.messageStorage.getFullChat(chatId).then((v) => v === null ? this.#c.messageStorage.getFullChat(chatId = ZERO_CHANNEL_ID - Number(update.chat_id)) : v);
|
|
122
122
|
let updateFullChat = false;
|
|
123
123
|
if (Api.is("groupCallDiscarded", update.call)) {
|
|
124
|
-
await this.#c.
|
|
125
|
-
await this.#c.
|
|
124
|
+
await this.#c.messageStorage.setGroupCall(update.call.id, null);
|
|
125
|
+
await this.#c.messageStorage.setGroupCallAccessHash(update.call.id, null);
|
|
126
126
|
if (fullChat !== null) {
|
|
127
127
|
fullChat.call = undefined;
|
|
128
128
|
updateFullChat = true;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
else {
|
|
132
|
-
await this.#c.
|
|
133
|
-
await this.#c.
|
|
132
|
+
await this.#c.messageStorage.setGroupCall(update.call.id, update.call);
|
|
133
|
+
await this.#c.messageStorage.setGroupCallAccessHash(update.call.id, update.call.access_hash);
|
|
134
134
|
if (fullChat !== null) {
|
|
135
135
|
if (!("call" in fullChat) || !fullChat.call || !Api.is("inputGroupCall", fullChat.call) || fullChat.call.id !== update.call.id) {
|
|
136
136
|
fullChat.call = { ...update.call, _: "inputGroupCall" };
|
|
@@ -139,7 +139,7 @@ export class VideoChatManager {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
if (updateFullChat) {
|
|
142
|
-
await this.#c.
|
|
142
|
+
await this.#c.messageStorage.setFullChat(chatId, fullChat);
|
|
143
143
|
}
|
|
144
144
|
return { videoChat: constructVideoChat(update.call) };
|
|
145
145
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_chat_list_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_chat_list_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAqG,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AACpO,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAChJ,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EA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C,EAAE,mBAAmB;IAKzD,aAAa,CAAC,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM;IAa5C,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE;IAK1B,WAAW,CAAC,MAAM,EAAE,EAAE;IAKtB,cAAc,CAAC,OAAO,EAAE,EAAE,EAAE;IAK5B,aAAa,CAAC,MAAM,EAAE,EAAE;IAKxB,cAAc,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,oBAAoB;IAkBxD,eAAe,CAAC,MAAM,EAAE,EAAE;IAe1B,mBAAmB,CAAC,MAAM,EAAE,EAAE;IAK9B,kBAAkB,CAAC,MAAM,EAAE,EAAE;CAIpC"}
|
|
@@ -36,17 +36,17 @@ export class ChatListManager {
|
|
|
36
36
|
async #handleUpdateChannel(update) {
|
|
37
37
|
const peer = { ...update, _: "peerChannel" };
|
|
38
38
|
const chatId = Api.peerToChatId(peer);
|
|
39
|
-
await this.#c.
|
|
39
|
+
await this.#c.messageStorage.setFullChat(chatId, null);
|
|
40
40
|
}
|
|
41
41
|
async #handleUpdateChat(update) {
|
|
42
42
|
const peer = { ...update, _: "peerChat" };
|
|
43
43
|
const chatId = Api.peerToChatId(peer);
|
|
44
|
-
await this.#c.
|
|
44
|
+
await this.#c.messageStorage.setFullChat(chatId, null);
|
|
45
45
|
}
|
|
46
46
|
async #handleUpdateUser(update) {
|
|
47
47
|
const peer = { ...update, _: "peerUser" };
|
|
48
48
|
const chatId = Api.peerToChatId(peer);
|
|
49
|
-
await this.#c.
|
|
49
|
+
await this.#c.messageStorage.setFullChat(chatId, null);
|
|
50
50
|
}
|
|
51
51
|
async getChats(from = "main", after, limit = 100) {
|
|
52
52
|
this.#c.storage.assertUser("getChats");
|
|
@@ -86,7 +86,7 @@ export class ChatListManager {
|
|
|
86
86
|
async #getFullChat(chatId) {
|
|
87
87
|
const inputPeer = await this.#c.getInputPeer(chatId);
|
|
88
88
|
const chatId_ = await this.#c.getInputPeerChatId(inputPeer);
|
|
89
|
-
let fullChat = await this.#c.
|
|
89
|
+
let fullChat = await this.#c.messageStorage.getFullChat(chatId_);
|
|
90
90
|
if (fullChat !== null) {
|
|
91
91
|
return fullChat;
|
|
92
92
|
}
|
|
@@ -99,9 +99,9 @@ export class ChatListManager {
|
|
|
99
99
|
else if (canBeInputChannel(inputPeer)) {
|
|
100
100
|
fullChat = (await this.#c.invoke({ _: "channels.getFullChannel", channel: toInputChannel(inputPeer) })).full_chat;
|
|
101
101
|
}
|
|
102
|
-
await this.#c.
|
|
102
|
+
await this.#c.messageStorage.setFullChat(chatId_, fullChat);
|
|
103
103
|
if (fullChat !== null && "call" in fullChat && Api.is("inputGroupCall", fullChat.call)) {
|
|
104
|
-
await this.#c.
|
|
104
|
+
await this.#c.messageStorage.setGroupCallAccessHash(fullChat.call.id, fullChat.call.access_hash);
|
|
105
105
|
}
|
|
106
106
|
return fullChat;
|
|
107
107
|
}
|
|
@@ -122,7 +122,11 @@ export class ChatListManager {
|
|
|
122
122
|
}
|
|
123
123
|
const chatMembers = new Array();
|
|
124
124
|
for (const p of participants.participants) {
|
|
125
|
-
|
|
125
|
+
const peer = this.#c.getPeer("peer" in p ? p.peer : { _: "peerUser", user_id: p.user_id });
|
|
126
|
+
if (!peer) {
|
|
127
|
+
unreachable();
|
|
128
|
+
}
|
|
129
|
+
chatMembers.push(constructChatMember(peer[0], p, this.#c.getPeer));
|
|
126
130
|
}
|
|
127
131
|
return chatMembers;
|
|
128
132
|
}
|
|
@@ -133,7 +137,11 @@ export class ChatListManager {
|
|
|
133
137
|
}
|
|
134
138
|
const chatMembers = new Array();
|
|
135
139
|
for (const p of fullChat.participants.participants) {
|
|
136
|
-
|
|
140
|
+
const peer = this.#c.getPeer({ _: "peerUser", user_id: p.user_id });
|
|
141
|
+
if (!peer) {
|
|
142
|
+
unreachable();
|
|
143
|
+
}
|
|
144
|
+
chatMembers.push(constructChatMember(peer[0], p, this.#c.getPeer));
|
|
137
145
|
}
|
|
138
146
|
return chatMembers;
|
|
139
147
|
}
|
|
@@ -145,14 +153,22 @@ export class ChatListManager {
|
|
|
145
153
|
const peer = await this.#c.getInputPeer(chatId);
|
|
146
154
|
if (canBeInputChannel(peer)) {
|
|
147
155
|
const { participant } = await this.#c.invoke({ _: "channels.getParticipant", channel: toInputChannel(peer), participant: await this.#c.getInputPeer(userId) });
|
|
148
|
-
|
|
156
|
+
const memberPeer = this.#c.getPeer("peer" in participant ? participant.peer : { _: "peerUser", user_id: participant.user_id });
|
|
157
|
+
if (!memberPeer) {
|
|
158
|
+
unreachable();
|
|
159
|
+
}
|
|
160
|
+
return constructChatMember(memberPeer[0], participant, this.#c.getPeer);
|
|
149
161
|
}
|
|
150
162
|
else if (Api.is("inputPeerChat", peer)) {
|
|
151
163
|
const user = await this.#c.getInputUser(userId);
|
|
152
164
|
const userId_ = BigInt(await this.#c.getInputPeerChatId(user));
|
|
153
165
|
const fullChat = await this.#c.invoke({ ...peer, _: "messages.getFullChat" }).then((v) => Api.as("chatFull", v.full_chat));
|
|
154
166
|
const participant = Api.as("chatParticipants", fullChat.participants).participants.find((v) => v.user_id === userId_);
|
|
155
|
-
|
|
167
|
+
const memberPeer = this.#c.getPeer({ _: "peerUser", user_id: participant.user_id });
|
|
168
|
+
if (!memberPeer) {
|
|
169
|
+
unreachable();
|
|
170
|
+
}
|
|
171
|
+
return constructChatMember(memberPeer[0], participant, this.#c.getPeer);
|
|
156
172
|
}
|
|
157
173
|
else {
|
|
158
174
|
throw new InputError("Expected a channel, supergroup, or group ID. Got a user ID instead.");
|
|
@@ -168,7 +184,11 @@ export class ChatListManager {
|
|
|
168
184
|
}
|
|
169
185
|
const chatMembers = new Array();
|
|
170
186
|
for (const p of participants.participants) {
|
|
171
|
-
|
|
187
|
+
const peer = this.#c.getPeer("peer" in p ? p.peer : { _: "peerUser", user_id: p.user_id });
|
|
188
|
+
if (!peer) {
|
|
189
|
+
unreachable();
|
|
190
|
+
}
|
|
191
|
+
chatMembers.push(constructChatMember(peer[0], p, this.#c.getPeer));
|
|
172
192
|
}
|
|
173
193
|
return chatMembers;
|
|
174
194
|
}
|
|
@@ -179,7 +199,11 @@ export class ChatListManager {
|
|
|
179
199
|
}
|
|
180
200
|
const chatMembers = new Array();
|
|
181
201
|
for (const p of fullChat.participants.participants) {
|
|
182
|
-
|
|
202
|
+
const peer = this.#c.getPeer({ _: "peerUser", user_id: p.user_id });
|
|
203
|
+
if (!peer) {
|
|
204
|
+
unreachable();
|
|
205
|
+
}
|
|
206
|
+
chatMembers.push(constructChatMember(peer[0], p, this.#c.getPeer));
|
|
183
207
|
}
|
|
184
208
|
return chatMembers;
|
|
185
209
|
}
|
|
@@ -42,7 +42,7 @@ export class ChatManager {
|
|
|
42
42
|
if (Api.is("updateChannelParticipant", update) || Api.is("updateChatParticipant", update)) {
|
|
43
43
|
const chatMember = constructChatMemberUpdated(update, this.#c.getPeer);
|
|
44
44
|
const selfId = await this.#c.getSelfId();
|
|
45
|
-
if (chatMember.oldChatMember.
|
|
45
|
+
if (chatMember.oldChatMember.member.id === selfId) {
|
|
46
46
|
return { myChatMember: chatMember };
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
@@ -40,10 +40,10 @@ export class ForumManager {
|
|
|
40
40
|
this.#c.storage.assertUser("sendAs");
|
|
41
41
|
send_as = await this.#c.getInputPeer(params.sendAs);
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
44
44
|
const updates = await this.#c.invoke({
|
|
45
|
-
_: "
|
|
46
|
-
|
|
45
|
+
_: "messages.createForumTopic",
|
|
46
|
+
peer,
|
|
47
47
|
title,
|
|
48
48
|
icon_color: params?.color,
|
|
49
49
|
icon_emoji_id: params?.customEmojiId ? BigInt(params.customEmojiId) : undefined,
|
|
@@ -66,10 +66,10 @@ export class ForumManager {
|
|
|
66
66
|
async editTopic(chatId, topicId, title, params) {
|
|
67
67
|
_a.#assertNongenralTopicIdValid(topicId);
|
|
68
68
|
title = _a.#validateTopicTitle(title);
|
|
69
|
-
const
|
|
69
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
70
70
|
const updates = await this.#c.invoke({
|
|
71
|
-
_: "
|
|
72
|
-
|
|
71
|
+
_: "messages.editForumTopic",
|
|
72
|
+
peer,
|
|
73
73
|
topic_id: topicId,
|
|
74
74
|
title,
|
|
75
75
|
icon_emoji_id: params?.customEmojiId ? BigInt(params.customEmojiId) : undefined,
|
|
@@ -78,10 +78,10 @@ export class ForumManager {
|
|
|
78
78
|
return constructTopic(assertMessageType(message, "forumTopicEdited"));
|
|
79
79
|
}
|
|
80
80
|
async #toggleGeneralTopicHidden(chatId, hidden) {
|
|
81
|
-
const
|
|
81
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
82
82
|
await this.#c.invoke({
|
|
83
|
-
_: "
|
|
84
|
-
|
|
83
|
+
_: "messages.editForumTopic",
|
|
84
|
+
peer,
|
|
85
85
|
topic_id: 1,
|
|
86
86
|
hidden,
|
|
87
87
|
});
|
|
@@ -94,10 +94,10 @@ export class ForumManager {
|
|
|
94
94
|
}
|
|
95
95
|
async #toggleNongeneralTopicClosed(chatId, topicId, closed) {
|
|
96
96
|
_a.#assertNongenralTopicIdValid(topicId);
|
|
97
|
-
const
|
|
97
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
98
98
|
await this.#c.invoke({
|
|
99
|
-
_: "
|
|
100
|
-
|
|
99
|
+
_: "messages.editForumTopic",
|
|
100
|
+
peer,
|
|
101
101
|
topic_id: 1,
|
|
102
102
|
closed,
|
|
103
103
|
});
|
|
@@ -110,10 +110,10 @@ export class ForumManager {
|
|
|
110
110
|
}
|
|
111
111
|
async #setTopicPinned(chatId, topicId, pinned) {
|
|
112
112
|
_a.#assertAnyTopicIdValid(topicId);
|
|
113
|
-
const
|
|
113
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
114
114
|
await this.#c.invoke({
|
|
115
|
-
_: "
|
|
116
|
-
|
|
115
|
+
_: "messages.updatePinnedForumTopic",
|
|
116
|
+
peer,
|
|
117
117
|
topic_id: 1,
|
|
118
118
|
pinned,
|
|
119
119
|
});
|
|
@@ -80,14 +80,14 @@ export class PollManager {
|
|
|
80
80
|
}
|
|
81
81
|
async handleUpdate(update) {
|
|
82
82
|
if (Api.is("updateMessagePoll", update)) {
|
|
83
|
-
await this.#c.
|
|
83
|
+
await this.#c.messageStorage.setPollResults(update.poll_id, update.results);
|
|
84
84
|
let poll = null;
|
|
85
85
|
if (update.poll) {
|
|
86
86
|
poll = update.poll;
|
|
87
|
-
await this.#c.
|
|
87
|
+
await this.#c.messageStorage.setPoll(poll.id, poll);
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
|
-
poll = await this.#c.
|
|
90
|
+
poll = await this.#c.messageStorage.getPoll(update.poll_id);
|
|
91
91
|
}
|
|
92
92
|
if (poll) {
|
|
93
93
|
const messageMediaPoll = { _: "messageMediaPoll", poll, results: update.results };
|
package/esm/client/5_client.d.ts
CHANGED
|
@@ -173,11 +173,11 @@ export interface Context {
|
|
|
173
173
|
/** Context-aware alias for `client.getCreatedInviteLinks()`. */
|
|
174
174
|
getCreatedInviteLinks: (params?: GetCreatedInviteLinksParams) => Promise<InviteLink[]>;
|
|
175
175
|
/** Context-aware alias for `client.leaveChat()`. */
|
|
176
|
-
|
|
176
|
+
leaveChat: () => Promise<void>;
|
|
177
177
|
/** Context-aware alias for `client.blockUser()`. */
|
|
178
|
-
|
|
178
|
+
blockUser: () => Promise<void>;
|
|
179
179
|
/** Context-aware alias for `client.unblockUser()`. */
|
|
180
|
-
|
|
180
|
+
unblockUser: () => Promise<void>;
|
|
181
181
|
/** Context-aware alias for `client.getChatMember()`. */
|
|
182
182
|
getChatMember: (userId: ID) => Promise<ChatMember>;
|
|
183
183
|
/** Context-aware alias for `client.getChatMember()`. */
|