Fix infinite recursion on .get_entity by exact name

This commit is contained in:
Lonami Exo 2018-02-20 17:30:01 +01:00
parent 0731a1d698
commit 7f35ed59c6

View File

@ -1934,8 +1934,8 @@ class TelegramClient(TelegramBareClient):
return entity return entity
try: try:
# Nobody with this username, maybe it's an exact name/title # Nobody with this username, maybe it's an exact name/title
return self.get_entity(self.get_input_entity(string)) return self.get_entity(self.session.get_input_entity(string))
except (ValueError, TypeError): except ValueError:
pass pass
raise TypeError( raise TypeError(