feat: Update Telegram bot implementation and its main execution script.
This commit is contained in:
8
run.py
8
run.py
@@ -344,14 +344,20 @@ def process_accounts(accounts: list, team_name: str, team_index: int = 0,
|
||||
# 已授权但未入库的状态 (直接尝试入库,不重新授权)
|
||||
# - authorized: 授权成功但入库失败
|
||||
# - partial: 部分完成
|
||||
need_crs_only = account_status in ["authorized", "partial"]
|
||||
# 注意: S2A 模式下 partial 状态需要重新授权,因为入库是授权过程的一部分
|
||||
if AUTH_PROVIDER == "s2a":
|
||||
need_crs_only = account_status == "authorized" # S2A: partial 需要重新授权
|
||||
else:
|
||||
need_crs_only = account_status in ["authorized", "partial"]
|
||||
|
||||
# 已注册但未授权的状态 (使用密码登录授权)
|
||||
# - registered: 已注册,需要授权
|
||||
# - auth_failed: 授权失败,重试
|
||||
# - partial (S2A模式): 入库验证失败,需要重新授权
|
||||
# - 新格式 Owner (role=owner 且状态不是 team_owner/completed) 也走密码登录
|
||||
need_auth_only = (
|
||||
account_status in ["registered", "auth_failed"]
|
||||
or (AUTH_PROVIDER == "s2a" and account_status == "partial") # S2A: partial 需要重新授权
|
||||
or (account_role == "owner" and account_status not in ["team_owner", "completed", "authorized", "partial"])
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user