fix: skip already-processing UIDs at FETCH level to avoid downloading email content

This commit is contained in:
2026-07-13 07:35:28 +08:00
parent d31ec18ea3
commit 155a6dfc53
4 changed files with 17 additions and 9 deletions

View File

@@ -193,7 +193,8 @@ def _summary_keyboard(can_reply: bool = True, is_promotion: bool = False, links:
for link in (links or []):
url = link.get("url", "")
text = link.get("text", "打开链接")[:30]
if url.startswith("http"):
# 校验 URL合法 http/https无多重协议头长度合理
if url.startswith("http") and url.count("://") == 1 and len(url) < 200:
kb.append([{"text": f"🔗 {text}", "url": url}])
return {"inline_keyboard": kb}