mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-09 16:10:51 +03:00
Handle ChatEmpty in utils.get_peer
This commit is contained in:
parent
46ee8e86c6
commit
c924365e24
|
@ -948,6 +948,8 @@ def get_peer(peer):
|
||||||
return types.PeerChannel(peer.id)
|
return types.PeerChannel(peer.id)
|
||||||
elif isinstance(peer, types.UserEmpty):
|
elif isinstance(peer, types.UserEmpty):
|
||||||
return types.PeerUser(peer.id)
|
return types.PeerUser(peer.id)
|
||||||
|
elif isinstance(peer, types.ChatEmpty):
|
||||||
|
return types.PeerChat(peer.id)
|
||||||
|
|
||||||
if peer.SUBCLASS_OF_ID in (0x7d7c6f86, 0xd9c7fc18):
|
if peer.SUBCLASS_OF_ID in (0x7d7c6f86, 0xd9c7fc18):
|
||||||
# ChatParticipant, ChannelParticipant
|
# ChatParticipant, ChannelParticipant
|
||||||
|
|
Loading…
Reference in New Issue
Block a user