mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 13:14:31 +03:00
Fix .get_input_entity excepting wrong type
This commit is contained in:
parent
b6b47d175c
commit
3512028d0f
|
@ -1079,7 +1079,7 @@ class TelegramClient(TelegramBareClient):
|
||||||
try:
|
try:
|
||||||
# First try to get the entity from cache, otherwise figure it out
|
# First try to get the entity from cache, otherwise figure it out
|
||||||
return self.session.get_input_entity(peer)
|
return self.session.get_input_entity(peer)
|
||||||
except KeyError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if isinstance(peer, str):
|
if isinstance(peer, str):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user