Spaces:
Paused
Paused
Use IPv4 for Telegram and bind bot messages to main agent
Browse files11 unmodified lines12131415161711 unmodified linesconfig.plugins.entries.telegram = { ...config.plugins.entries.telegram, enabled: true };config.channels ??= {};config.channels.telegram = { ...config.channels.telegram, enabled: true, dmPolicy: 'pairing', groupPolicy: 'allowlist' };const allowed = (process.env.TELEGRAM_ALLOW_FROM || '').split(',').map(s => s.trim()).filter(s => /^\d+$/.test(s));if (allowed.length) { config.channels.telegram.dmPolicy = 'allowlist'; config.channels.telegram.allowFrom = allowed; }// The bundled Telegram plugin reads TELEGRAM_BOT_TOKEN from the environment.11 unmodified lines12131415161718192011 unmodified linesconfig.plugins.entries.telegram = { ...config.plugins.entries.telegram, enabled: true };config.channels ??= {};config.channels.telegram = { ...config.channels.telegram, enabled: true, dmPolicy: 'pairing', groupPolicy: 'allowlist' };config.channels.telegram.network = { ...config.channels.telegram.network, autoSelectFamily: false, dnsResultOrder: 'ipv4first' };config.bindings ??= [];if (!config.bindings.some(b => b.match?.channel === 'telegram' && b.match?.accountId === 'default')) config.bindings.push({ agentId: 'main', match: { channel: 'telegram', accountId: 'default' } });const allowed = (process.env.TELEGRAM_ALLOW_FROM || '').split(',').map(s => s.trim()).filter(s => /^\d+$/.test(s));if (allowed.length) { config.channels.telegram.dmPolicy = 'allowlist'; config.channels.telegram.allowFrom = allowed; }// The bundled Telegram plugin reads TELEGRAM_BOT_TOKEN from the environment.
start-telegram.mjs+3