fix(client): do not catch up id disableUpdates is used

This commit is contained in:
teidesu 2021-04-24 20:02:40 +03:00
parent df2d77ec90
commit 3ca8f847e6

View file

@ -127,7 +127,8 @@ export async function start(
try {
const me = await this.getMe()
// user is already authorized
if (params.catchUp !== false) await this.catchUp()
if (params.catchUp !== false && !this._disableUpdates)
await this.catchUp()
return me
} catch (e) {
if (!(e instanceof AuthKeyUnregisteredError)) throw e