mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Expose catch_up in client constructor and default it to False
This commit is contained in:
parent
3a44f56f64
commit
dfc6d448ed
|
@ -245,7 +245,8 @@ class TelegramBaseClient(abc.ABC):
|
|||
system_lang_code: str = 'en',
|
||||
loop: asyncio.AbstractEventLoop = None,
|
||||
base_logger: typing.Union[str, logging.Logger] = None,
|
||||
receive_updates: bool = True
|
||||
receive_updates: bool = True,
|
||||
catch_up: bool = False
|
||||
):
|
||||
if not api_id or not api_hash:
|
||||
raise ValueError(
|
||||
|
@ -429,7 +430,7 @@ class TelegramBaseClient(abc.ABC):
|
|||
self._megagroup_cache = {}
|
||||
|
||||
# This is backported from v2 in a very ad-hoc way just to get proper update handling
|
||||
self._catch_up = True
|
||||
self._catch_up = catch_up
|
||||
self._updates_queue = asyncio.Queue()
|
||||
self._message_box = MessageBox()
|
||||
# This entity cache is tailored for the messagebox and is not used for absolutely everything like _entity_cache
|
||||
|
|
Loading…
Reference in New Issue
Block a user