fix(client): made _handleUpdate method public

This commit is contained in:
teidesu 2021-06-24 00:13:10 +03:00
parent 028e331cb6
commit bf84556776
3 changed files with 5 additions and 4 deletions

View file

@ -107,7 +107,7 @@ async function addSingleMethod(state, fileName) {
) )
} }
const isPrivate = name[0] === '_' const isPrivate = name[0] === '_' && name !== '_handleUpdate'
const isExported = (stmt.modifiers || []).find( const isExported = (stmt.modifiers || []).find(
(mod) => mod.kind === 92 /* ExportKeyword */ (mod) => mod.kind === 92 /* ExportKeyword */
) )

View file

@ -1477,7 +1477,7 @@ export interface TelegramClient extends BaseTelegramClient {
* sending a message anywhere. Useful when an `InputFile` is required. * sending a message anywhere. Useful when an `InputFile` is required.
* *
* This method is quite low-level, and you should use other * This method is quite low-level, and you should use other
* methods like {@link sendDocument} that handle this under the hood. * methods like {@link sendMedia} that handle this under the hood.
* *
* @param params Upload parameters * @param params Upload parameters
*/ */
@ -2849,6 +2849,7 @@ export interface TelegramClient extends BaseTelegramClient {
users: UsersIndex, users: UsersIndex,
chats: ChatsIndex chats: ChatsIndex
): void ): void
_handleUpdate(update: tl.TypeUpdates, noDispatch?: boolean): void
/** /**
* Catch up with the server by loading missed updates. * Catch up with the server by loading missed updates.
* *
@ -3219,7 +3220,7 @@ export class TelegramClient extends BaseTelegramClient {
protected _loadStorage = _loadStorage protected _loadStorage = _loadStorage
protected _saveStorage = _saveStorage protected _saveStorage = _saveStorage
dispatchUpdate = dispatchUpdate dispatchUpdate = dispatchUpdate
protected _handleUpdate = _handleUpdate _handleUpdate = _handleUpdate
catchUp = catchUp catchUp = catchUp
blockUser = blockUser blockUser = blockUser
deleteProfilePhotos = deleteProfilePhotos deleteProfilePhotos = deleteProfilePhotos

View file

@ -32,7 +32,7 @@ const OVERRIDE_MIME: Record<string, string> = {
* sending a message anywhere. Useful when an `InputFile` is required. * sending a message anywhere. Useful when an `InputFile` is required.
* *
* This method is quite low-level, and you should use other * This method is quite low-level, and you should use other
* methods like {@link sendDocument} that handle this under the hood. * methods like {@link sendMedia} that handle this under the hood.
* *
* @param params Upload parameters * @param params Upload parameters
* @internal * @internal