fix(avatar): fail closed on BOXIM connection errors

This commit is contained in:
stefanfeng
2026-08-20 14:47:13 +08:00
parent 08590bf9ea
commit 51a317ccd9
7 changed files with 173 additions and 17 deletions
@@ -34,12 +34,12 @@ def get_takeover_status(
.count()
)
if not enabled:
if cursor and cursor.last_error:
status, message = "error", cursor.last_error
elif not enabled:
status, message = "disabled", "主动接管未开启"
elif not user or not user.huihui_token:
status, message = "needs_login", "请重新登录会会生产账号以连接 BOXIM"
elif cursor and cursor.last_error:
status, message = "error", cursor.last_error
elif (
cursor
and cursor.initialized