mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Fix .get_input_entity excepting wrong type
This commit is contained in:
@@ -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):
|
||||||
|
Reference in New Issue
Block a user