fix: use original email subject for reply, not AI-extracted title Reply emails should use the original subject from IMAP header (e.g. 'Re: [original]'), not the AI-generated Chinese summary title.

This commit is contained in:
2026-07-22 13:28:36 +08:00
parent b18dcb0527
commit e0c2110c09
2 changed files with 4 additions and 2 deletions

View File

@@ -360,7 +360,7 @@ def _handle_callback(bot_token: str, cfg: Config, cb: dict):
action = parts[0]
ctx = load_email_context(msg_id)
subject = ctx["subject"] if ctx else "?"
subject = ctx.get("original_subject") or ctx["subject"] if ctx else "?"
logger.info("TG 回调: action=%s msg_id=%d subject=%s", action, msg_id, subject)
if action == CALLBACK_VIEW_ORIG and ctx:
@@ -725,7 +725,7 @@ def _do_send_reply(bot_token: str, cfg: Config,
to_addr = parseaddr(ctx["sender"])[1]
if not to_addr:
to_addr = ctx["sender"]
subject = ctx["subject"]
subject = ctx.get("original_subject") or ctx["subject"]
# 下载 Telegram 附件到本地
local_files = []