Skip to content

Commit

Permalink
Wrap init request in invokeWithoutUpdates if requested
Browse files Browse the repository at this point in the history
This may fix #3743.
  • Loading branch information
Lonami committed Jan 14, 2023
1 parent d81eb0b commit cc3d25e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions telethon/client/telegrambaseclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,11 @@ async def connect(self: 'TelegramClient') -> None:

self._init_request.query = functions.help.GetConfigRequest()

await self._sender.send(functions.InvokeWithLayerRequest(
LAYER, self._init_request
))
req = self._init_request
if self._no_updates:
req = functions.InvokeWithoutUpdatesRequest(req)

await self._sender.send(functions.InvokeWithLayerRequest(LAYER, req))

if self._message_box.is_empty():
me = await self.get_me()
Expand Down

0 comments on commit cc3d25e

Please sign in to comment.