Feature:
We shall allow passing more options to the HTTP server,
in `https.createServer()`.
We are using a new property, `https`, to avoid any namespace
collisions with our own options.
`options.key`, `options.cert` and `options.pfx` are convenient
options, in that they allow the user to provide paths to the
corresponding files, which are read automatically,
though synchronously!
Implementation:
* completely backwards-compatible
* all changes are being tested, except `options.pfx`
References:
* Pass `ca` prop to https.createServer(): https://github.com/yagop/node-telegram-bot-api/pull/17
Feature:
For finer control over bot's polling and web-hook, the
following methods have been added:
* TelegramBot#isPolling()
* TelegramBot#openWebHook()
* TelegramBot#closeWebHook()
* TelegramBot#hasOpenWebHook()
Please read README.md for more information on the
new methods.
For writable streams, like `http.ClientRequest`, there is no `end` event, only `finish`. Thus, `req.end` was never called and never sending a response.
This resulted in a nasty bug for WebHook users that basically rendered the library useless because if Telegram doesn't receive a response from the bot server, it will continue to queue and send requests until it does, or until 24 hours have passed.