Merge pull request #28 from gabi-simons/fix/sandbox-proxy-agent

fix: use https.globalAgent in grammY Bot for sandbox proxy
This commit is contained in:
gavrielc
2026-03-11 22:52:26 +02:00
committed by GitHub

View File

@@ -1,3 +1,4 @@
import https from 'https';
import { Api, Bot } from 'grammy'; import { Api, Bot } from 'grammy';
import { ASSISTANT_NAME, TRIGGER_PATTERN } from '../config.js'; import { ASSISTANT_NAME, TRIGGER_PATTERN } from '../config.js';
@@ -53,7 +54,11 @@ export class TelegramChannel implements Channel {
} }
async connect(): Promise<void> { async connect(): Promise<void> {
this.bot = new Bot(this.botToken); this.bot = new Bot(this.botToken, {
client: {
baseFetchConfig: { agent: https.globalAgent, compress: true },
},
});
// Command to get chat ID (useful for registration) // Command to get chat ID (useful for registration)
this.bot.command('chatid', (ctx) => { this.bot.command('chatid', (ctx) => {