fix(core): handle zero found peers in foundInputPeers
This commit is contained in:
parent
9e00e8ccca
commit
9aa03853c8
1 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,11 @@ export async function findDialogs(client: ITelegramClient, peers: MaybeArray<str
|
|||
foundIdxToOriginalIdx.set(foundInputPeers.length - 1, i)
|
||||
}
|
||||
|
||||
if (foundInputPeers.length === 0) {
|
||||
// we didn't find anything, we can't even fetch the dialogs
|
||||
throw new MtPeerNotFoundError(`Could not find dialogs with peers: ${peers.join(', ')}`)
|
||||
}
|
||||
|
||||
const dialogs = await getPeerDialogs(client, foundInputPeers)
|
||||
|
||||
if (foundInputPeers.length === peers.length) {
|
||||
|
|
Loading…
Reference in a new issue