mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Change the way no_updates mode is enabled
See discussion on https://github.com/LonamiWebs/Telethon/commit/49713b2. The problem with the automatic approach is that some scripts may do some "fancier" things with the way they register updates, so it was prone to failure (a handler could be added but since the last request was without updates, nothing would be received). This new approach is a bit more annoying to opt-into but also more explicit.
This commit is contained in:
@@ -51,7 +51,7 @@ class UserMethods:
|
||||
else:
|
||||
raise errors.FloodWaitError(request=r, capture=diff)
|
||||
|
||||
if not self._event_builders and not self._conversations:
|
||||
if self._no_updates:
|
||||
r = functions.InvokeWithoutUpdatesRequest(r)
|
||||
|
||||
request_index = 0
|
||||
|
Reference in New Issue
Block a user