feat: support attachments in manual reply (photo/video/document/voice) - Add _extract_media: extract media info from Telegram messages - Add _download_tg_file: download files from Telegram API - Modify _handle_message: accumulate attachments in awaiting_reply, send with text - Modify _handle_update: process messages without text (media-only) - Modify smtp_client.send_reply: support MIME multipart with attachments - Add comprehensive tests (11 tests, all passing)

This commit is contained in:
2026-07-17 19:04:27 +08:00
parent d05277581c
commit d76a119190
3 changed files with 141 additions and 11 deletions

View File

@@ -3,3 +3,4 @@
## 固定规则
- **Telegram parse_mode 永远为 MarkdownV2**,不传 None。需要发纯文本时用 Markdown 转义包装,而不是去掉 parse_mode。
- **所有代码改动必须完整测试**,除非用户明确说不需要测试。没有测试的代码不算完成。