fix(core): typo in method name
This commit is contained in:
parent
fe722fbb61
commit
70b5a423c6
8 changed files with 10 additions and 10 deletions
|
@ -726,7 +726,7 @@ withParams(params: RpcCallOptions): this\n`)
|
|||
'importSession',
|
||||
'exportSession',
|
||||
'handleClientUpdate',
|
||||
'getApiCrenetials',
|
||||
'getApiCredentials',
|
||||
'getPoolSize',
|
||||
'getPrimaryDcId',
|
||||
'computeSrpParams',
|
||||
|
|
|
@ -301,7 +301,7 @@ export class BaseTelegramClient implements ITelegramClient {
|
|||
this.updates?.handleClientUpdate(updates, noDispatch)
|
||||
}
|
||||
|
||||
async getApiCrenetials(): Promise<{
|
||||
async getApiCredentials(): Promise<{
|
||||
id: number
|
||||
hash: string
|
||||
}> {
|
||||
|
|
|
@ -6949,8 +6949,8 @@ TelegramClient.prototype.exportSession = function (...args) {
|
|||
TelegramClient.prototype.handleClientUpdate = function (...args) {
|
||||
return this._client.handleClientUpdate(...args)
|
||||
}
|
||||
TelegramClient.prototype.getApiCrenetials = function (...args) {
|
||||
return this._client.getApiCrenetials(...args)
|
||||
TelegramClient.prototype.getApiCredentials = function (...args) {
|
||||
return this._client.getApiCredentials(...args)
|
||||
}
|
||||
TelegramClient.prototype.getPoolSize = function (...args) {
|
||||
return this._client.getPoolSize(...args)
|
||||
|
|
|
@ -61,7 +61,7 @@ export interface ITelegramClient {
|
|||
onConnectionState: Emitter<ConnectionState>
|
||||
onError: Emitter<Error>
|
||||
|
||||
getApiCrenetials(): Promise<{ id: number, hash: string }>
|
||||
getApiCredentials(): Promise<{ id: number, hash: string }>
|
||||
// todo - this is only used for file dl/ul, which should probably be moved
|
||||
// to the client to allow moving the thing to worker
|
||||
// or at least load this once at startup (and then these methods can be made sync)
|
||||
|
|
|
@ -28,7 +28,7 @@ export async function sendCode(
|
|||
): Promise<SentCode> {
|
||||
const phone = normalizePhoneNumber(params.phone)
|
||||
|
||||
const { id, hash } = await client.getApiCrenetials()
|
||||
const { id, hash } = await client.getApiCredentials()
|
||||
|
||||
const res = await client.call(
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ import { _onAuthorization } from './utils.js'
|
|||
* @throws BadRequestError In case the bot token is invalid
|
||||
*/
|
||||
export async function signInBot(client: ITelegramClient, token: string): Promise<User> {
|
||||
const { id, hash } = await client.getApiCrenetials()
|
||||
const { id, hash } = await client.getApiCredentials()
|
||||
|
||||
const res = await client.call({
|
||||
_: 'auth.importBotAuthorization',
|
||||
|
|
|
@ -99,7 +99,7 @@ export async function signInQr(
|
|||
}
|
||||
|
||||
try {
|
||||
const { id, hash } = await client.getApiCrenetials()
|
||||
const { id, hash } = await client.getApiCredentials()
|
||||
|
||||
loop: while (true) {
|
||||
let res: tl.auth.TypeLoginToken
|
||||
|
|
|
@ -47,7 +47,7 @@ export abstract class TelegramWorkerPort<Custom extends WorkerCustomMethods> imp
|
|||
readonly importSession: ITelegramClient['importSession']
|
||||
readonly exportSession: ITelegramClient['exportSession']
|
||||
readonly handleClientUpdate: ITelegramClient['handleClientUpdate']
|
||||
readonly getApiCrenetials: ITelegramClient['getApiCrenetials']
|
||||
readonly getApiCredentials: ITelegramClient['getApiCredentials']
|
||||
readonly getPoolSize: ITelegramClient['getPoolSize']
|
||||
readonly getPrimaryDcId: ITelegramClient['getPrimaryDcId']
|
||||
readonly changePrimaryDc: ITelegramClient['changePrimaryDc']
|
||||
|
@ -84,7 +84,7 @@ export abstract class TelegramWorkerPort<Custom extends WorkerCustomMethods> imp
|
|||
this.importSession = bind('importSession')
|
||||
this.exportSession = bind('exportSession')
|
||||
this.handleClientUpdate = bind('handleClientUpdate', true)
|
||||
this.getApiCrenetials = bind('getApiCrenetials')
|
||||
this.getApiCredentials = bind('getApiCredentials')
|
||||
this.getPoolSize = bind('getPoolSize')
|
||||
this.getPrimaryDcId = bind('getPrimaryDcId')
|
||||
this.changePrimaryDc = bind('changePrimaryDc')
|
||||
|
|
Loading…
Reference in a new issue