feat: AI generates plain_text field, view full text shows readable version instead of HTML

This commit is contained in:
2026-07-14 14:37:12 +08:00
parent dd7fc61fd4
commit c3132f746a
3 changed files with 5 additions and 2 deletions

View File

@@ -276,7 +276,7 @@ def _handle_callback(tg_cfg: TelegramConfig, cfg: Config, cb: dict):
if action == CALLBACK_VIEW_ORIG and ctx:
can_reply = ctx.get("can_reply", True)
text = f"*📄 原文 \\- {_escape(ctx['subject'])}*\n\n{_escape(ctx['original_body'])}"
text = f"*📄 原文 \\- {_escape(ctx['subject'])}*\n\n{_escape(ctx.get('plain_text', ctx['original_body']))}"
_tg_req(tg_cfg, "editMessageText", {
"chat_id": chat_id, "message_id": msg_id,
"text": text, "parse_mode": "MarkdownV2",