Fix TelegramClient.get_input_entity always failing/missing return

This commit is contained in:
Lonami Exo 2017-10-06 21:43:04 +02:00
parent 79e36c98bd
commit 3bf70692b4

View File

@ -930,7 +930,7 @@ class TelegramClient(TelegramBareClient):
"""
try:
# First try to get the entity from cache, otherwise figure it out
self.session.entities.get_input_entity(peer)
return self.session.entities.get_input_entity(peer)
except KeyError:
pass
@ -960,7 +960,7 @@ class TelegramClient(TelegramBareClient):
self.get_dialogs(limit=None)
try:
self.session.entities.get_input_entity(peer)
return self.session.entities.get_input_entity(peer)
except KeyError:
pass