GochoMugo
f28416fbaf
src/telegram: Implement downloadFile() in terms of getFileStream()
8 years ago
GochoMugo
04e8b892aa
src/telegram: Emit 'info' on stream from TelegramBot#getFileStream()
8 years ago
GochoMugo
b968e893d3
src/telegram: Populate Stream#path from TelegramBot#getFileStream()
8 years ago
GochoMugo
d9692f45a9
src/telegram: Add TelegramBot#getFileStream()
...
References:
* FR: https://github.com/yagop/node-telegram-bot-api/issues/442
8 years ago
Gocho Mugo
0870684d83
src/polling: Fix the Offset Infinite Loop bug ( #265 )
...
References:
* BR: https://github.com/yagop/node-telegram-bot-api/issues/36
8 years ago
GochoMugo
b1f0ebaf17
src/polling: Add options to TelegramBot#stopPolling()
...
Feature:
* Simply, pass through options to TelegramBot#stopPolling(options)
to TelegramBotPolling#stop(options)
References:
* Related PR: https://github.com/yagop/node-telegram-bot-api/pull/456
8 years ago
GochoMugo
ce9ff57a63
src/telegram: Don't JSON-serialize parameter if already of String type
8 years ago
GochoMugo
012e7df35f
src: Support API v3.5 `provider_data` parameter
8 years ago
GochoMugo
57dec19bab
src: Support future additional Telegram parameters
...
References:
* FR: https://github.com/yagop/node-telegram-bot-api/issues/454
8 years ago
GochoMugo
cfde217488
test: Fix lint error
8 years ago
GochoMugo
79118b9fae
doc: Minor fixes, Update changelog
8 years ago
GochoMugo
1f61b82aa8
doc: Fix documented types for params `chatId`, `userId`
...
References:
* BR: https://github.com/yagop/node-telegram-bot-api/issues/300
8 years ago
GochoMugo
633bd83a0a
src/telegram: JSON-serialize 'mask_position's
...
References:
* Similar PR: https://github.com/yagop/node-telegram-bot-api/pull/468
8 years ago
drGOD
4586ebd10b
src/telegram: JSON-serialize shipping_options in answerShippingQuery ( #468 )
8 years ago
GochoMugo
ba4d207684
src: Improve performance when matching message types
...
Feature:
Considering that the most encountered message type is (probably) 'text',
we should match it as soon as possible; without wasting much time
looping through less-likely-to-matched types.
8 years ago
GochoMugo
772609c334
doc: Update ParseError message; error might not be from Telegram
8 years ago
GochoMugo
8c965d3a14
src: Improve default error logging of `polling_error`, `webhook_error`
...
References:
* BR: https://github.com/yagop/node-telegram-bot-api/issues/377
8 years ago
GochoMugo
bbac07ad2c
doc: Document TelegramBot.errors, TelegramBot.messageTypes
8 years ago
GochoMugo
49df0c6e02
src/telegram: Add metadata argument in `message` event (and friends)
...
References:
* FR: https://github.com/yagop/node-telegram-bot-api/issues/409
* PR: https://github.com/yagop/node-telegram-bot-api/pull/413
8 years ago
GochoMugo
3722c7182c
src/telegram: Fix TelegramBot#answerCallbackQuery() signature
...
Bug:
`callbackQueryId` is a required argument. All other options
are optional.
References:
* Telegram API doc: https://core.telegram.org/bots/api#answercallbackquery
* Blame: https://github.com/yagop/node-telegram-bot-api/pull/368
8 years ago
GochoMugo
b6349de67e
doc: Document TelegramBot#on()
...
References:
* Issue: https://github.com/yagop/node-telegram-bot-api/issues/436
8 years ago
GochoMugo
4f50f7350c
src/telegram: Add API v3.2 methods
...
Notes:
Add methods:
* TelegramBot#createNewStickerSet
* TelegramBot#addStickerToSet
* TelegramBot#setStickerPositionInSet
* TelegramBot#deleteStickerFromSet
Tests are missing!
References:
* FR: https://github.com/yagop/node-telegram-bot-api/issues/407
8 years ago
Mohammed Sohail
4d90529492
[API v3.4] Support sticker sets
8 years ago
Mohammed Sohail
7315fcff3e
[Fix] Minor copypasta typo
8 years ago
Mohammed Sohail
962ce2af3c
[API v3.4] Support live locations
8 years ago
CapacitorSet
8fd243e6a8
src/telegram: Add TelegramBot#uploadStickerFile
...
Notes:
* Closes PR #430
References:
* FR: https://github.com/yagop/node-telegram-bot-api/issues/407
* PR: https://github.com/yagop/node-telegram-bot-api/pull/430
* PR-by: @CapacitorSet
8 years ago
CapacitorSet
a2d85b889a
src/telegram: Add TelegramBot#getStickerSet()
...
References:
* FR: https://github.com/yagop/node-telegram-bot-api/issues/407
* PR: https://github.com/yagop/node-telegram-bot-api/pull/429
* PR-by: @CapacitorSet , @libertylocked
8 years ago
GochoMugo
f4f015a621
src/telegram: Use $NTBA_FIX_319 to apply fix for #319
...
Notes:
The permanent fix introduces backwards-incompatible changes, which
require a major version bump. Until we release v1,
environment variable `${NTBA_FIX_319}` can be used to apply
the fix.
References:
* BR: https://github.com/yagop/node-telegram-bot-api/issues/319
9 years ago
GochoMugo
ef48af49f5
src/telegram: Deprecate auto-enabling Promise cancellation
...
Side-effects:
src/telegram: Allow providing custom Promise constructor
References:
* BR: https://github.com/yagop/node-telegram-bot-api/issues/319
9 years ago
Misha
67839b6faa
src/telegram: Update TelegramBot#answerCallbackQuery() signature
...
Feature:
The signature is inconsistent from other methods in TelegramBot.
Make it consistent.
References:
* FR: https://github.com/yagop/node-telegram-bot-api/issues/367
* PR: https://github.com/yagop/node-telegram-bot-api/pull/368
* PR-by: @mnb3000
9 years ago
GochoMugo
fd8251b90f
chore/syntax: Fix missing colons
9 years ago
Savely Krasovsky
83d3235cc5
src/telegram: Support Bot API v3.1
...
References:
* Bot API v3.1: https://core.telegram.org/bots/api-changelog#june-30-2017
9 years ago
kucherenkovova
61e8f85368
src/telegram: Fix download file path on windows
...
References:
* BR: https://github.com/yagop/node-telegram-bot-api/issues/363
* PR: https://github.com/yagop/node-telegram-bot-api/pull/364
* PR-by: @kucherenkovova
9 years ago
GochoMugo
d082a2d7d9
src/telegram: Sort the message types for less cognitive load
9 years ago
GochoMugo
73269e79e2
src/telegram: Add missing event 'video_note'
...
References:
* API Message type: https://core.telegram.org/bots/api#message
* API v3 progress tracker: https://github.com/yagop/node-telegram-bot-api/issues/332
9 years ago
Mohammed Sohail
fe527957e0
src/telegram: Support API v3 Payments ( #335 )
...
References:
* API v3 Payments: https://core.telegram.org/bots/payments
* PR: https://github.com/yagop/node-telegram-bot-api/pull/335
* PR-by: @kamikazechaser
* API v3 progress tracker: https://github.com/yagop/node-telegram-bot-api/issues/332
9 years ago
Mohammed Sohail
07a6e5ff23
src/telegram: Add missing Message sub-types, Deprecate old ones ( #340 )
...
References:
* PR: https://github.com/yagop/node-telegram-bot-api/pull/340
* PR-by: @kamikazechaser
9 years ago
Mohammed Sohail
177c951340
src/telegram: Add API v3 new update types and message sub-types ( #333 )
...
References:
* API changelog: https://core.telegram.org/bots/api-changelog#may-18-2017
* PR: https://github.com/yagop/node-telegram-bot-api/pull/333
* PR-by: @kamikazechaser
* API v3: https://github.com/yagop/node-telegram-bot-api/issues/332
9 years ago
GochoMugo
cda9d8d597
src/telegram: Add deleteMessage method
...
References:
* API deleteMessage method: https://core.telegram.org/bots/api#deleteMessage
* PR: https://github.com/yagop/node-telegram-bot-api/pull/324
* PR-by: @JonasFowl
* API v3: https://github.com/yagop/node-telegram-bot-api/issues/332
9 years ago
Mohammed Sohail
942fc4854b
src/telegram: Add sendVideoNote method ( #330 )
...
References:
* API sendVideoNote method: https://core.telegram.org/bots/api#sendvideonote
* PR: https://github.com/yagop/node-telegram-bot-api/pull/330
* PR-by: @kamikazechaser
* API v3: https://github.com/yagop/node-telegram-bot-api/issues/332
9 years ago
GochoMugo
11bcdd3b6a
src/telegram: Add TelegramBot#removeTextListener()
...
Feature:
This is the opposite action to `TelegramBot#onText()`.
It allows removing any previously-registered listeners.
It is similar to `TelegramBot#removeReplyListener()`.
9 years ago
Fabio Zuber
9f3107b5ab
src/telegram: reset state of global regexp ( #326 )
...
References:
* BR: https://github.com/yagop/node-telegram-bot-api/issues/325
* BR-by: @Sirius-A
* PR: https://github.com/yagop/node-telegram-bot-api/pull/326
* PR-by: @Sirius-A
9 years ago
GochoMugo
607a39ed5e
src/polling: Fix defaulting value of 'options.polling.params.timeout'
9 years ago
GochoMugo
130f6940ce
src/polling: Fix bug #284
...
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: https://github.com/yagop/node-telegram-bot-api/issues/284
* Reported by: @dcparga
9 years ago
GochoMugo
9a9dfa9560
src: Minor fixes
9 years ago
GochoMugo
e75d51ca8f
src/polling: Add constructor option 'options.polling.params'
...
Feature:
Please see the updated API reference for more information on this
new option.
Side-effects:
* `options.timeout` is deprecated!
References:
* "Feature request": https://github.com/yagop/node-telegram-bot-api/issues/243
9 years ago
Gocho Mugo
eed7c1e4d0
src: Add proper error handling ( #283 )
...
Feature:
Please see `doc/usage.md` for more information on error-handling.
9 years ago
GochoMugo
6f5dad6e5b
src/telegram: Add shim for Array#findIndex()
...
Bug:
Array#findIndex() is unavailable in Node.js v0.x.
Since we are deprecating Node.js v0.x already, we
can use a shim in the mean time.
Once we stop supporting that version range, we can
drop the shim entirely.
tags: deprecate/node-v0.x
9 years ago
GochoMugo
79de62a96e
src/telegram: Add TelegramBot#removeReplyListener()
...
Feature:
Please see the updated API Reference.
References:
* Author: @githugger (Frederic Schneider <fschneider1992@gmail.com>)
* Original PR: https://github.com/yagop/node-telegram-bot-api/pull/74
9 years ago
GochoMugo
7e4cadb514
src/polling: Fix bug #281
...
Bug:
On certain errors, during polling, cause the following error to be
thrown:
TypeError: Cannot read property 'statusCode' of undefined
This is caused when we try to access the 'response' property on
the error object in the error handler (`catch(error)`). It goes
missing when the error was fatal, for example, network error, thus
no server response available.
References:
* Issue #281 : https://github.com/yagop/node-telegram-bot-api/issues/281
* Reported-by: @dimawebmaker
9 years ago