openclaw/extensions/telegram
Bakhtier Sizhaev a0cb443aa3
fix: document Telegram asDocument alias (#52461) (thanks @bakhtiersizhaev)
* feat(telegram): add asDocument param to message tool

Adds `asDocument` as a user-facing alias for the existing `forceDocument`
parameter in the message tool. When set to `true`, media files (images,
videos, GIFs) are sent via `sendDocument` instead of `sendPhoto`/
`sendVideo`/`sendAnimation`, preserving the original file quality
without Telegram compression.

This is useful when agents need to deliver high-resolution images or
uncompressed files to users via Telegram.

`asDocument` is intentionally an alias rather than a replacement — the
existing `forceDocument` continues to work unchanged.

Changes:
- src/agents/tools/message-tool.ts: add asDocument to send schema
- src/agents/tools/telegram-actions.ts: OR asDocument into forceDocument
- src/infra/outbound/message-action-runner.ts: same OR logic for outbound path
- extensions/telegram/src/channel-actions.ts: read and forward asDocument
- src/channels/plugins/actions/actions.test.ts: add test case

* fix: restore channel-actions.ts to main version (rebase conflict fix)

* fix(test): match asDocument test payload to actual params structure

* fix(telegram): preserve forceDocument alias semantics

* fix: document Telegram asDocument alias (#52461) (thanks @bakhtiersizhaev)

---------

Co-authored-by: Бахтиер Сижаев <bkh@MacBook-Air.local>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-23 17:32:46 +05:30
..
src fix: document Telegram asDocument alias (#52461) (thanks @bakhtiersizhaev) 2026-03-23 17:32:46 +05:30
allow-from.ts perf: split telegram audit runtime seams 2026-03-22 00:53:12 +00:00
api.ts refactor: route extension seams through public apis 2026-03-19 03:20:10 +00:00
index.ts refactor: clean extension api boundaries 2026-03-17 09:38:21 -07:00
openclaw.plugin.json
package.json build: bump version to 2026.3.22 2026-03-22 11:58:33 -07:00
runtime-api.ts fix: harden plugin docker e2e 2026-03-22 23:42:34 -07:00
setup-entry.ts refactor: clean extension api boundaries 2026-03-17 09:38:21 -07:00