feat: scan all IMAP folders for unread emails, not just INBOX
This commit is contained in:
@@ -42,6 +42,7 @@ def ai_process(cfg: Config, acct_idx: int, mail: Email) -> Optional[dict]:
|
||||
"acct_idx": acct_idx,
|
||||
"account_email": mail.account_email,
|
||||
"uid": mail.uid,
|
||||
"folder": mail.folder,
|
||||
"thinking_msg_id": thinking_msg_id,
|
||||
}
|
||||
|
||||
@@ -81,5 +82,5 @@ def tg_send_and_mark(cfg: Config, info: dict):
|
||||
original_reply_to=info.get("original_reply_to", ""),
|
||||
account_email=info.get("account_email", ""))
|
||||
# 只有发送成功才标记已读
|
||||
mark_as_seen(acct, [info["uid"]])
|
||||
mark_as_seen(acct, [(info["uid"], info.get("folder", "INBOX"))])
|
||||
logger.info(f" TG 发送成功,已标记已读")
|
||||
|
||||
Reference in New Issue
Block a user