mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-11 03:56:36 +03:00
Fix .get_input_entity error message always showing None
This commit is contained in:
parent
ce0dee63b1
commit
0f34a9b333
|
@ -2272,6 +2272,7 @@ class TelegramClient(TelegramBareClient):
|
|||
return InputPeerSelf()
|
||||
return utils.get_input_peer(self._get_entity_from_string(peer))
|
||||
|
||||
original_peer = peer
|
||||
if not isinstance(peer, int):
|
||||
try:
|
||||
if peer.SUBCLASS_OF_ID != 0x2d45687: # crc32(b'Peer')
|
||||
|
@ -2281,7 +2282,7 @@ class TelegramClient(TelegramBareClient):
|
|||
|
||||
if not peer:
|
||||
raise TypeError(
|
||||
'Cannot turn "{}" into an input entity.'.format(peer)
|
||||
'Cannot turn "{}" into an input entity.'.format(original_peer)
|
||||
)
|
||||
|
||||
# Add the mark to the peers if the user passed a Peer (not an int)
|
||||
|
|
Loading…
Reference in New Issue
Block a user