mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-03 10:40:16 +00:00
Remove unnecessary call to .get_input_entity()
This commit is contained in:
@@ -504,7 +504,7 @@ class TelegramClient(TelegramBareClient):
|
||||
if limit == 0:
|
||||
# No messages, but we still need to know the total message count
|
||||
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
|
||||
))
|
||||
return getattr(result, 'count', len(result.messages)), [], []
|
||||
|
Reference in New Issue
Block a user