Cookie失效时标记账号状态+推送明确提示重新扫码
This commit is contained in:
@@ -282,7 +282,7 @@ def _push_signin_result(account_id: str, result: dict, elapsed: float):
|
||||
elif status == "completed" and result.get("signed", 0) == 0 and result.get("total", 0) == 0:
|
||||
msg = result.get("message", "")
|
||||
if "no topics" in msg:
|
||||
lines = [f"⚠️ {remark} 签到失败: 获取超话列表失败(可能被风控或 Cookie 失效)"]
|
||||
lines = [f"⚠️ {remark} Cookie 已失效,请重新扫码添加"]
|
||||
elif "no selected" in msg:
|
||||
lines = [f"⚠️ {remark} 签到跳过: 没有选中的超话"]
|
||||
else:
|
||||
@@ -392,9 +392,10 @@ async def _async_do_signin(account_id: str, cron_expr: str = ""):
|
||||
result = await session.execute(select(Account).where(Account.id == acc_id))
|
||||
acc = result.scalar_one_or_none()
|
||||
if acc:
|
||||
acc.status = "invalid_cookie"
|
||||
acc.last_checked_at = datetime.now()
|
||||
await session.commit()
|
||||
return {"status": "completed", "signed": 0, "message": "no topics"}
|
||||
return {"status": "completed", "signed": 0, "message": "no topics - cookie可能已失效"}
|
||||
|
||||
# 如果用户选择了特定超话,只签选中的
|
||||
if acc_selected_topics and isinstance(acc_selected_topics, list):
|
||||
|
||||
Reference in New Issue
Block a user