Fix get_peer for int which made ab557a8 useless

This commit is contained in:
Lonami Exo 2018-12-28 17:54:15 +01:00
parent 4ad9c9bf31
commit 619e4dc2d6

View File

@ -712,7 +712,10 @@ def get_inner_text(text, entities):
def get_peer(peer):
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
elif isinstance(peer, (
types.contacts.ResolvedPeer, types.InputNotifyPeer,