mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
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
This commit is contained in:
parent
ef48af49f5
commit
f4f015a621
@ -50,6 +50,7 @@ const _deprecatedMessageTypes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
if (!process.env.NTBA_FIX_319) {
|
||||||
// Enable Promise cancellation.
|
// Enable Promise cancellation.
|
||||||
try {
|
try {
|
||||||
const msg =
|
const msg =
|
||||||
@ -69,6 +70,7 @@ try {
|
|||||||
throw ex;
|
throw ex;
|
||||||
/* eslint-enable no-console */
|
/* eslint-enable no-console */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class TelegramBot extends EventEmitter {
|
class TelegramBot extends EventEmitter {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user