feat: 收件人/发件人改用邮件原始头数据

- sender 从 decode 改为使用原始 From 头
- 新增 recipient 字段,使用原始 To 头
- 移除 ai_process 中对 acct.username 的依赖
This commit is contained in:
earthjasonlin committed 2026-07-02 22:04:27 +08:00 Verified
1 parent 2ebcad0a70
commit ad950ff367
3 files changed
+13 -9

No files matched your search

+2 -1
View File
@@ -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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.