diff --git a/packages/client/src/methods/updates.ts b/packages/client/src/methods/updates.ts index 864e9f2a..cb191b6d 100644 --- a/packages/client/src/methods/updates.ts +++ b/packages/client/src/methods/updates.ts @@ -692,6 +692,20 @@ async function _processSingleUpdate( ) } + // update local pts/qts + if (pts) { + if (channelId) { + this._cpts[channelId] = pts + this._cptsMod[channelId] = pts + } else { + this._pts = pts + } + } + + if (qts) { + this._qts = qts + } + if (isDummyUpdate(upd) || noDispatch) { // we needed to check pts/qts, so we couldn't return right away return @@ -735,20 +749,6 @@ async function _processSingleUpdate( this._dispatchUpdate(upd, peers.users, peers.chats) } - - // update local pts/qts - if (pts) { - if (channelId) { - this._cpts[channelId] = pts - this._cptsMod[channelId] = pts - } else { - this._pts = pts - } - } - - if (qts) { - this._qts = qts - } } /**