Follow-up
This commit is contained in:
parent
33c8b1f385
commit
8a025f81f5
@ -48,7 +48,7 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs)
|
|||||||
const session = new sessions.CallbackSession(sessionData, onSessionUpdate);
|
const session = new sessions.CallbackSession(sessionData, onSessionUpdate);
|
||||||
|
|
||||||
client = new TelegramClient(
|
client = new TelegramClient(
|
||||||
new sessions.CallbackSession(sessionData, onSessionUpdate),
|
session,
|
||||||
process.env.TELEGRAM_T_API_ID,
|
process.env.TELEGRAM_T_API_ID,
|
||||||
process.env.TELEGRAM_T_API_HASH,
|
process.env.TELEGRAM_T_API_HASH,
|
||||||
{
|
{
|
||||||
@ -59,8 +59,6 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs)
|
|||||||
} as any,
|
} as any,
|
||||||
);
|
);
|
||||||
|
|
||||||
onSessionUpdate(session.getSessionData());
|
|
||||||
|
|
||||||
client.addEventHandler(handleGramJsUpdate, gramJsUpdateEventBuilder);
|
client.addEventHandler(handleGramJsUpdate, gramJsUpdateEventBuilder);
|
||||||
client.addEventHandler(updater, gramJsUpdateEventBuilder);
|
client.addEventHandler(updater, gramJsUpdateEventBuilder);
|
||||||
|
|
||||||
@ -97,6 +95,7 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
onAuthReady();
|
onAuthReady();
|
||||||
|
onSessionUpdate(session.getSessionData());
|
||||||
onUpdate({ '@type': 'updateApiReady' });
|
onUpdate({ '@type': 'updateApiReady' });
|
||||||
|
|
||||||
void fetchCurrentUser();
|
void fetchCurrentUser();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user