mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-06-29 19:21:34 +08:00
fix(outlook): 多项修复与优化
- imap_new: 连接池并发安全(锁外建连、占位防重复)、IDLE tag 改用独立计数器避免私有API、get_recent_emails 新增 since_minutes 参数 - service.py: 同步更新 - accounts.py: Outlook 收件箱配置按 email 不区分大小写匹配、不受 enabled 限制 - settings.js: Outlook 批量导入前端校验要求四字段且 client_id/refresh_token 非空
This commit is contained in:
@@ -1028,9 +1028,11 @@ def _build_inbox_config(db, service_type, email: str) -> dict:
|
||||
EmailServiceModel.enabled == True
|
||||
)
|
||||
if service_type == EST.OUTLOOK:
|
||||
# 按 config.email 匹配账号 email
|
||||
services = query.all()
|
||||
svc = next((s for s in services if (s.config or {}).get("email") == email), None)
|
||||
# 按 config.email 精确匹配,不受 enabled 限制(收件箱是账号自己的邮箱)
|
||||
all_outlook = db.query(EmailServiceModel).filter(
|
||||
EmailServiceModel.service_type == db_type
|
||||
).all()
|
||||
svc = next((s for s in all_outlook if (s.config or {}).get("email", "").lower() == email.lower()), None)
|
||||
else:
|
||||
svc = query.order_by(EmailServiceModel.priority.asc()).first()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user