Remove if condition in _run_handlers
See original GitHub issueHi
The if condition in _run_handlers
is creating issues, when I try to test tgvoip example. I modified it as
def _run_handlers(self, update: Dict[Any, Any]) -> None:
if update.get('@type') == 'updateNewMessage':
for handler in self._message_handlers:
self._workers_queue.put(
(handler, update),
timeout=self._queue_put_timeout,
)
else:
for handler in self._message_handlers:
self._workers_queue.put(
(handler, update),
timeout=self._queue_put_timeout,
)
or we can create another method for add_message_handler
like add_call_handler
and append functions to new list like _call_handler. In else condition use it.
If ok, I can create a PR.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Remove entries in a python set based on condition
One way to approach this would be to iterate through the set and create an array for the elements which fulfill the conditions...
Read more >Remove a list element based on condition
Also, I would like to combine conditions to check if the element does not contain any of a list of variables, and remove...
Read more >Remove array elements if a certain condition is met with a for ...
I am trying to use a for loop to find the values between -2.5 to 2.5 in the first two columns of a...
Read more >Conditionally Remove Row from Data Frame in R (3 Examples)
Our example data contains five rows and three columns. Example 1: Remove Row Based on Single Condition. If we want to delete one...
Read more >Testing API | Visual Studio Code Extension API
Testing APIs in VS Code allow users to discover and run unit tests in their workspace.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. Thanks for suggestion. Will do it this weekend and let u know.
Fixed in https://github.com/alexander-akhmetov/python-telegram/pull/19