-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Switch to webhooks #118
Comments
Unnecessary.
How?
PR welcome. |
The bot picks up the last 48 Hours with long polling Also not sure how it's supposed to be more secure, long polling should use https |
Updated the issue description to detail some more stuff. |
Actually I just checked and Telegram doesn't store updates longer than 24 Hours regardless of using long polling or Webhooks: "Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours." |
Hopfully works around telegraf/telegraf#735 #118
Hopfully works around telegraf/telegraf#735 thedevs-network#118
About this suggestion
While long polling is used in the Guard, switching to webhooks can make the bot faster and can even catch up things missed during downtimes. That means, we need to pick a module that we can use for handling requests from Telegram. Express.js maybe a good choice, but others are available.
It should be configurable whenever they want to go back to polling by setting
NODE_ENV
variable todevelopment
. If they want to use webhooks by default, they need to configureconfig.serverApi.hostUrl
andconfig.serverApi.tgWebhookEndpoint
(defaults to/api/telegram/webhookEndpoint
).Why going to webhooks?
Known Issues
chat
is undefined for some reasons inutils/tg.js
. See also in Telegram for details and its workaround.FAQs
Should I blame Telegraf for these issues listed above?
Maybe, but the best way is to create an issue in their Issue Tracker so they can fix it.
The text was updated successfully, but these errors were encountered: