mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Merge pull request #102 from msx98/getdialogs-catch-peeridinvalid
Catch `PeerIdInvalid` in `get_dialogs`
This commit is contained in:
commit
a653065774
1 changed files with 2 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ from typing import AsyncGenerator, Optional
|
|||
|
||||
import pyrogram
|
||||
from pyrogram import types, raw, utils
|
||||
from pyrogram.errors import ChannelPrivate
|
||||
from pyrogram.errors import ChannelPrivate, PeerIdInvalid
|
||||
|
||||
|
||||
class GetDialogs:
|
||||
|
|
@ -80,7 +80,7 @@ class GetDialogs:
|
|||
chat_id = utils.get_peer_id(message.peer_id)
|
||||
try:
|
||||
messages[chat_id] = await types.Message._parse(self, message, users, chats)
|
||||
except ChannelPrivate:
|
||||
except (ChannelPrivate, PeerIdInvalid):
|
||||
continue
|
||||
|
||||
dialogs = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue