telegram-bot
telegram-bot copied to clipboard
HTTPS Server listening for updates via setWebhook
I just added the method set_webhook on the dev branch. However, I wasn't able to provide a listen method that works similar to long_pull, but uses the webhook to acquire updates.
There are several problems that stop me from implementing listen, but mainly I didn't do it for this reason: I can't test it. Telegram sends updates via HTTPS only and does NOT accept self signed certs. Maybe this will change in the future, but right now I don't have time to get one and test more http stuff.
Just use long_pull for now.
You can use the openshift free plan to use the webhook, I'm using it and the SSL is handled automatically. https://hub.openshift.com/quickstarts/150-rust
When I have time I'll test this library to learn Rust for sure :smile:
I'm not sure if you misunderstood me or the other way around ;)
I am talking about the Telegram-API method setWebhook. A bot can listen as a https server and receive updates on that way. This has nothing to do with git or anything...
Yeah, but you said: "but mainly I didn't do it for this reason: I can't test it." With openshift you (or other) can test it free ;-)
Oh now I get, what you're saying. But I don't really want to push every time I want to test it. But I consider doing this the next time I can spare some time for this project ...
Nice!
Just as a side note, to test in openshift you don't push to the main repo, you push to a git created for the "gear" deployed.
Not sure of the status of this feature right now, but Telegram recently added support for self-signed certs. https://core.telegram.org/bots/self-signed
Sweet, thanks for the bump! Will look into it sometime soon, I think.
Lets encrypt allows you to automatically create certificates for your own domains.