Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 5d0caf5

Browse files
authored
Disable deprecated automatic promise cancellation in telegram (#298)
Closes #267 Previously the telegram library automatically would enable bluebird promise cancellation. It is recommended to set the `NTBA_FIX_319` environment variable to disable automatic activation and only enable it if needed. We don't use promise cancellation arround here and anyone using our telegram service propably doesn't either. If this is the case they should enable it themselfs.
1 parent 97715d3 commit 5d0caf5

File tree

1 file changed

+4
-0
lines changed
  • services/nodecg-io-telegram/extension

1 file changed

+4
-0
lines changed

services/nodecg-io-telegram/extension/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { NodeCG } from "nodecg-types/types/server";
22
import { Result, emptySuccess, success, ServiceBundle, Logger } from "nodecg-io-core";
3+
4+
// Disable automatic promise cancellation
5+
// Check https://github.com/yagop/node-telegram-bot-api/issues/319 for more information about this
6+
process.env.NTBA_FIX_319 = "1";
37
import TelegramBot = require("node-telegram-bot-api");
48

59
interface TelegramServiceConfig {

0 commit comments

Comments
 (0)