Remove unnecessary call to .get_input_entity()

This commit is contained in:
Lonami Exo 2017-11-16 13:24:32 +01:00
parent a1c669333e
commit b346561f89

View File

@ -504,7 +504,7 @@ class TelegramClient(TelegramBareClient):
if limit == 0: if limit == 0:
# No messages, but we still need to know the total message count # No messages, but we still need to know the total message count
result = self(GetHistoryRequest( result = self(GetHistoryRequest(
peer=self.get_input_entity(entity), limit=1, peer=entity, limit=1,
offset_date=None, offset_id=0, max_id=0, min_id=0, add_offset=0 offset_date=None, offset_id=0, max_id=0, min_id=0, add_offset=0
)) ))
return getattr(result, 'count', len(result.messages)), [], [] return getattr(result, 'count', len(result.messages)), [], []