fix(client): wrong missing peer handling
im actually very dumb
This commit is contained in:
parent
8e548d2aa5
commit
b43070e3df
1 changed files with 2 additions and 1 deletions
|
@ -430,7 +430,7 @@ async function fetchMissingPeers(
|
|||
const bare = typeof peer === 'number' ? markedPeerIdToBare(peer) : getBarePeerId(peer)
|
||||
|
||||
const marked = typeof peer === 'number' ? peer : getMarkedPeerId(peer)
|
||||
const index = marked > 0 ? peers.chats : peers.users
|
||||
const index = marked > 0 ? peers.users : peers.chats
|
||||
|
||||
if (index.has(bare)) return true
|
||||
if (missing.has(marked)) return false
|
||||
|
@ -963,6 +963,7 @@ async function onUpdate(
|
|||
// we still want to collect them, so we can fetch them in the background.
|
||||
// we won't wait for them, since that would block the updates loop
|
||||
|
||||
state.log.debug('loading missing peers for %s (pts = %d, cid = %d)', upd._, pending.pts, pending.channelId)
|
||||
missing = await fetchMissingPeers(client, upd, pending.peers, pending.fromDifference)
|
||||
|
||||
if (!pending.fromDifference && missing.size) {
|
||||
|
|
Loading…
Reference in a new issue