mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-23 01:46:35 +03:00
Fix get_peer for int which made ab557a8
useless
This commit is contained in:
parent
4ad9c9bf31
commit
619e4dc2d6
|
@ -712,7 +712,10 @@ def get_inner_text(text, entities):
|
||||||
|
|
||||||
def get_peer(peer):
|
def get_peer(peer):
|
||||||
try:
|
try:
|
||||||
if peer.SUBCLASS_OF_ID == 0x2d45687:
|
if isinstance(peer, int):
|
||||||
|
pid, cls = resolve_id(peer)
|
||||||
|
return cls(pid)
|
||||||
|
elif peer.SUBCLASS_OF_ID == 0x2d45687:
|
||||||
return peer
|
return peer
|
||||||
elif isinstance(peer, (
|
elif isinstance(peer, (
|
||||||
types.contacts.ResolvedPeer, types.InputNotifyPeer,
|
types.contacts.ResolvedPeer, types.InputNotifyPeer,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user