fix utils.get_peer not raising in some cases

This commit is contained in:
udf 2018-11-23 16:47:09 +02:00 committed by Lonami
parent d214c78bd0
commit 9362f03fd5

View File

@ -711,6 +711,7 @@ def get_peer(peer):
elif isinstance(peer, types.InputPeerChannel):
return types.PeerChannel(peer.channel_id)
except (AttributeError, TypeError):
pass
_raise_cast_fail(peer, 'Peer')