-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: During polling, deleting the already-set webhook, caused the `TelegramBotPolling#_getUpdates()` return an unexpected value. We expect the method to return an array (in the `.then()` clause). However, deleting the webhook returns its value, which is an object, from the method `_getUpdates()`. Fix: Simply retry the polling request and return the promise. Notes: Should we use recursion? I do not think so. Why? The chances of getting the error (having a webhook set) AGAIN is quite rare. And if it happens, there must be some problem with different instances invoking polling and webhook simultaneously. In that case, we wont struggle to recover from such a scenario. User is on their own! Isht! References: * Bug report: yagop/node-telegram-bot-api#284 * Reported by: @dcparga
- Loading branch information
1 parent
4dac5b1
commit 625b2fe
Showing
2 changed files
with
20 additions
and
3 deletions.
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