← Back to PRs

#7902: feat: Implement Telegram video note support with tests and docs

by thewulf7 open 2026-02-03 09:24 View on GitHub →
docs channel: telegram stale
To be able to support Telegram distinguishes **video notes** (round bubble) from **video files** (rectangular). OpenClaw defaults to video files. Goes good with VideoMessageAvatars SKILL [https://www.clawhub.ai/thewulf7/avatar-video-messages](https://www.clawhub.ai/thewulf7/avatar-video-messages) For message tool sends, set `asVideoNote: true` with a video `media` URL: ```json5 { action: "send", channel: "telegram", to: "123456789", media: "https://example.com/video.mp4", asVideoNote: true, } ``` (Note: Video notes do not support captions. If you provide a message text, it will be sent as a separate message.) ![Video Project](https://github.com/user-attachments/assets/6d5e9bf5-fbc0-4a6e-b961-e5d3dbc02575) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds Telegram **video note** support (`asVideoNote: true`) alongside the existing media send logic, plus documentation and a new Vitest suite covering the video note behavior. The implementation updates `sendMessageTelegram` to route `kind === "video"` media through `api.sendVideoNote` when requested, and to send any accompanying text as a separate Telegram message (since video notes don’t support captions). Main integration point is `src/telegram/send.ts`, where outbound Telegram sends already normalize targets, apply threading/reply markup, render Markdown-ish text into Telegram-safe HTML, and decide between media endpoints (`sendPhoto`/`sendVideo`/`sendAudio`/etc.). Video notes are added as another branch in that existing decision tree. <h3>Confidence Score: 4/5</h3> - This PR is generally safe to merge; the core behavior change is localized and matches Telegram API constraints, but one new test is incomplete and won’t catch reply_markup regressions for video notes. - Reviewed the updated `sendMessageTelegram` media path and new docs/tests. The implementation avoids sending captions for video notes and guards against empty follow-up text, which addresses a common runtime failure mode. The main remaining concern is test coverage quality: one new test case doesn’t assert the intended behavior, so a regression could slip through. - src/telegram/send.video-note.test.ts <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs