Skip to content

Commit

Permalink
chore: refactor telegram client api
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Nov 7, 2024
1 parent eb29637 commit e13ead9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/api/telegram/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class TelegramClientApi extends TelegramClient {
#connectMutex = new Mutex();
#disconnectMutex = new Mutex();

constructor ( { apiId, apiHash, session, deviceModel, appVersion, connectionRetries = 5, logLevel, ...options } = {} ) {
constructor ( { apiId, apiHash, session, deviceModel, appVersion, connectionRetries = 5, logLevel, connect, ...options } = {} ) {
const stringSession = new StringSession( session );

super( stringSession, apiId, apiHash, {
Expand All @@ -30,6 +30,8 @@ export default class TelegramClientApi extends TelegramClient {
// "langPack": "",
// "systemLangCode": clientParams.systemLangCode,
} );

if ( connect ) this.connect();
}

// properties
Expand Down

0 comments on commit e13ead9

Please sign in to comment.