feat: 收件人/发件人改用邮件原始头数据
- sender 从 decode 改为使用原始 From 头 - 新增 recipient 字段,使用原始 To 头 - 移除 ai_process 中对 acct.username 的依赖
This commit is contained in:
@@ -22,7 +22,7 @@ _conversations: dict[int, dict] = {}
|
||||
@retry()
|
||||
def send_summary(tg_cfg: TelegramConfig, chat_id: str, summary_text: str,
|
||||
summary_data: dict, original_body: str, account_idx: int,
|
||||
original_sender: str = "") -> int:
|
||||
original_sender: str = "", original_recipient: str = "") -> int:
|
||||
can_reply = summary_data.get("can_reply", True)
|
||||
result = _tg_req(tg_cfg, "sendMessage", {
|
||||
"chat_id": chat_id,
|
||||
@@ -36,6 +36,7 @@ def send_summary(tg_cfg: TelegramConfig, chat_id: str, summary_text: str,
|
||||
"summary_data": summary_data,
|
||||
"original_body": original_body[:10000],
|
||||
"original_sender": original_sender or summary_data.get("sender", ""),
|
||||
"original_recipient": original_recipient or summary_data.get("recipient", ""),
|
||||
"account_idx": account_idx,
|
||||
"sender": summary_data.get("sender", ""),
|
||||
"subject": summary_data.get("subject", ""),
|
||||
|
||||
Reference in New Issue
Block a user