mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-13 04:56:35 +03:00
Let utils.get_peer handle DialogPeer
This is important since some updates have a peer of that type instead of just the normal Peer instance.
This commit is contained in:
parent
1dc6d226b7
commit
c12c65f728
|
@ -771,6 +771,8 @@ def get_peer(peer):
|
||||||
return peer.peer
|
return peer.peer
|
||||||
elif isinstance(peer, types.ChannelFull):
|
elif isinstance(peer, types.ChannelFull):
|
||||||
return types.PeerChannel(peer.id)
|
return types.PeerChannel(peer.id)
|
||||||
|
elif isinstance(peer, types.DialogPeer):
|
||||||
|
return peer.peer
|
||||||
|
|
||||||
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