mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-06 13:23:11 +03:00
Support get_messages(ids=) without entity
This commit is contained in:
parent
e2ce55871e
commit
97b0a0610e
|
@ -1123,7 +1123,11 @@ class TelegramClient(TelegramBareClient):
|
||||||
an higher limit, so you're free to set the ``batch_size`` that
|
an higher limit, so you're free to set the ``batch_size`` that
|
||||||
you think may be good.
|
you think may be good.
|
||||||
"""
|
"""
|
||||||
|
# It's possible to get messages by ID without their entity, so only
|
||||||
|
# fetch the input version if we're not using IDs or if it was given.
|
||||||
|
if not ids or entity:
|
||||||
entity = self.get_input_entity(entity)
|
entity = self.get_input_entity(entity)
|
||||||
|
|
||||||
if ids:
|
if ids:
|
||||||
if not utils.is_list_like(ids):
|
if not utils.is_list_like(ids):
|
||||||
ids = (ids,)
|
ids = (ids,)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user