openclaw/extensions/telegram/src
thepagent 0ee11d3321
feat: add --force-document to message.send for Telegram (bypass sendPhoto + image optimizer) (#45111)
* feat: add --force-document to message.send for Telegram

Adds --force-document CLI flag to bypass sendPhoto and use sendDocument
instead, avoiding Telegram image compression for PNG/image files.

- TelegramSendOpts: add forceDocument field
- send.ts: skip sendPhoto when forceDocument=true (mediaSender pattern)
- ChannelOutboundContext: add forceDocument field
- telegramOutbound.sendMedia: pass forceDocument to sendMessageTelegram
- ChannelHandlerParams / DeliverOutboundPayloadsCoreParams: add forceDocument
- createChannelOutboundContextBase: propagate forceDocument
- outbound-send-service.ts: add forceDocument to executeSendAction params
- message-action-runner.ts: read forceDocument from params
- message.ts: add forceDocument to MessageSendParams
- register.send.ts: add --force-document CLI option

* fix: pass forceDocument through telegram action dispatch path

The actual send path goes through dispatchChannelMessageAction ->
telegramMessageActions.handleAction -> handleTelegramAction, not
deliverOutboundPayloads. forceDocument was not being read in
readTelegramSendParams or passed to sendMessageTelegram.

* fix: apply forceDocument to GIF branch to avoid sendAnimation

* fix: add disable_content_type_detection=true to sendDocument for --force-document

* fix: add forceDocument to buildSendSchema for agent discoverability

* fix: scope telegram force-document detection

* test: fix heartbeat target helper typing

* fix: skip image optimization when forceDocument is set

* fix: persist forceDocument in WAL queue for crash-recovery replay

* test: tighten heartbeat target test entry typing

---------

Co-authored-by: thepagent <thepagent@users.noreply.github.com>
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-03-14 19:43:49 +08:00
..
bot refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
account-inspect.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
account-inspect.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
accounts.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
accounts.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
allow-from.test.ts refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
allow-from.ts refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
allowed-updates.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
api-fetch.test.ts refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
api-fetch.ts refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
api-logging.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
approval-buttons.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
approval-buttons.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
audit-membership-runtime.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
audit.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
audit.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-access.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-access.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-handlers.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.acp-bindings.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.audio-transcript.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.body.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.dm-threads.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.dm-topic-threadid.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.implicit-mention.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.named-account-dm.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.sender-prefix.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.session.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.test-harness.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.thread-binding.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.topic-agentid.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-context.types.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-dispatch.sticker-media.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-dispatch.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message-dispatch.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-message.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-command-menu.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-command-menu.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-commands.group-auth.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-commands.plugin-auth.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-commands.session-meta.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-commands.skills-allowlist.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-commands.test-helpers.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-commands.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-native-commands.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot-updates.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.create-telegram-bot.test-harness.ts refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
bot.create-telegram-bot.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.fetch-abort.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.helpers.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.media.downloads-media-file-path-no-file-download.e2e.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.media.e2e-harness.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.media.stickers-and-fragments.e2e.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.media.test-utils.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
bot.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
button-types.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
caption.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
channel-actions.ts feat: add --force-document to message.send for Telegram (bypass sendPhoto + image optimizer) (#45111) 2026-03-14 19:43:49 +08:00
channel.test.ts refactor: share telegram channel test harnesses 2026-03-13 21:40:53 +00:00
channel.ts refactor: make OutboundSendDeps dynamic with channel-ID keys (#45517) 2026-03-14 02:42:21 -07:00
conversation-route.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
dm-access.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
draft-chunking.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
draft-chunking.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
draft-stream.test-helpers.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
draft-stream.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
draft-stream.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
exec-approvals-handler.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
exec-approvals-handler.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
exec-approvals.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
exec-approvals.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
fetch.env-proxy-runtime.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
fetch.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
fetch.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
format.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
format.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
format.wrap-md.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
forum-service-message.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
group-access.base-access.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
group-access.group-policy.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
group-access.policy-access.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
group-access.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
group-config-helpers.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
group-migration.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
group-migration.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
inline-buttons.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
inline-buttons.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
lane-delivery-state.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
lane-delivery-text-deliverer.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
lane-delivery.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
lane-delivery.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
model-buttons.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
model-buttons.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
monitor.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
monitor.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
network-config.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
network-config.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
network-errors.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
network-errors.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
normalize.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
onboarding.ts refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
outbound-adapter.ts feat: add --force-document to message.send for Telegram (bypass sendPhoto + image optimizer) (#45111) 2026-03-14 19:43:49 +08:00
outbound-params.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
polling-session.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
probe.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
probe.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
proxy.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
proxy.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
reaction-level.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
reaction-level.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
reasoning-lane-coordinator.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
reasoning-lane-coordinator.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
runtime.ts refactor: harden browser runtime profile handling 2026-03-09 00:25:43 +00:00
send.proxy.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
send.test-harness.ts refactor: remove channel shim directories, point all imports to extensions (#45967) 2026-03-14 03:43:07 -07:00
send.test.ts feat: add --force-document to message.send for Telegram (bypass sendPhoto + image optimizer) (#45111) 2026-03-14 19:43:49 +08:00
send.ts feat: add --force-document to message.send for Telegram (bypass sendPhoto + image optimizer) (#45111) 2026-03-14 19:43:49 +08:00
sendchataction-401-backoff.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
sendchataction-401-backoff.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
sent-message-cache.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
sequential-key.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
sequential-key.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
status-issues.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
status-reaction-variants.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
status-reaction-variants.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
sticker-cache.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
sticker-cache.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
target-writeback.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
target-writeback.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
targets.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
targets.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
thread-bindings.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
thread-bindings.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
token.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
token.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
update-offset-store.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
update-offset-store.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
voice.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
voice.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
webhook.test.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00
webhook.ts refactor: move Telegram channel implementation to extensions/ (#45635) 2026-03-14 02:50:17 -07:00