* feat: Remove bluebird
* docs: Update
* remove depd ans use node native deprecate msg warnings
* fix: correct util import name
* remove: contributor dev dependencie and add list of contributors in the readme
Feature:
The different mechanisms of fetching updates, i.e. polling
and webhook, have had their implementations improved:
* the TelegramBot instance needs to create the polling and
webhook instances once, and when necessary
* returning promises from TelegramBot#openWebHook() and
TelegramBot#startPolling() allows more precise control
Also,
* TelegramBot#initPolling() is being deprecated in favor of
TelegramBot#startPolling() to ensure consistency (as the
opposite action of TelegramBot#stopPolling())
Bug:
The confusion between using 'options' (passed by caller)
and 'this.options' (cached on the object), we were making
the assumption 'options.https' is unchanged!
It's references is changed already as we had earlier assigned
'this.options' to point to 'options', thus same object.
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.