Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@radek-paclt
Copy link
Contributor

Summary

Previously, outbound Telegram API calls (sendMessage, setMessageReaction, deleteMessage) ignored the configured proxy setting. This meant messages could bypass the proxy even when channels.telegram.accounts.*.proxy was set.

This fix ensures all outbound Telegram operations use the same proxy configuration as the monitor/polling code.

Changes

  • Import makeProxyFetch in src/telegram/send.ts
  • Apply proxy to sendMessageTelegram(), reactMessageTelegram(), and deleteMessageTelegram() functions
  • Uses the same pattern as existing monitor.ts implementation

Test plan

  • Build passes (npm run build)
  • Lint passes (npm run lint)
  • Tests pass (npm test)
  • Verified proxy calls appear in Squid access log when proxy is configured

🤖 Generated with Claude Code

The proxy configuration (`channels.telegram.proxy`) was only used for
the gateway monitor (polling), but not for outbound sends (sendMessage,
reactMessage, deleteMessage). This caused outbound messages to bypass
the configured proxy, which is problematic for users behind corporate
proxies or those who want to route all traffic through a specific proxy.

This change ensures that all three outbound functions use the same
proxy configuration as the monitor:
- sendMessageTelegram
- reactMessageTelegram
- deleteMessageTelegram

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@steipete steipete self-assigned this Jan 25, 2026
steipete added a commit that referenced this pull request Jan 25, 2026
@steipete
Copy link
Contributor

Thanks @radek-paclt! Landed with:

  • 65e2d93 (original PR commit)
  • 7e9aa3c (proxy helper + tests + changelog)

Fixes/tests: centralized outbound client options for Telegram, added proxy coverage for send/react/delete, updated changelog.

Tests: pnpm lint && pnpm build && pnpm test

@steipete steipete closed this Jan 25, 2026
mcinteerj pushed a commit to mcinteerj/moltbot that referenced this pull request Jan 25, 2026
rodrigouroz pushed a commit to rodrigouroz/moltbot that referenced this pull request Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants