-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap requests in InvokeWithoutUpdatesRequest if no event handlers
Closes #1270.
- Loading branch information
Showing
2 changed files
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49713b2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If an event handler later gets added you have to call a high level function to make updates start...
49713b2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run_until_disconnected
callsgetState
:Telethon/telethon/client/updates.py
Lines 25 to 33 in 1e6be28
However it is true people may use things like
loop.run_forever()
, orrun_until_disconnected
on another client. Do you think this will be a big issue? If so, we can just add another bool to the client's parameters.49713b2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It think it's an issue, for example if some code registers handlers entirely dynamically based on telegram state