将登录巡检能力收口到provider层

This commit is contained in:
liuwei
2026-05-07 13:48:49 +08:00
parent 81ea198aa2
commit 050e537ba3
4 changed files with 51 additions and 1 deletions

View File

@@ -46,6 +46,14 @@ class Legacy855WechatClient(
MessageMixin.__init__(self)
self._init_runtime_state()
async def run_login_health_check(self) -> bool:
"""执行 855 provider 的登录态巡检。"""
# 855 仍然保留“二次自动校验登录”的历史运维动作:
# 1. 这项逻辑本来就属于 855 provider 的登录模型,不应该继续挂在 Robot 上;
# 2. 这里直接复用 provider 内部现有 `twice_auto_auth` 能力,避免重新拆一套重复逻辑;
# 3. 上层系统任务只需要调用统一入口,不再关心底层到底是 855 还是别的 server。
return bool(await self.twice_auto_auth())
async def send_at_message(self, wxid: str, content: str, at: list[str]) -> tuple[int, int, int]:
"""发送 @ 消息,兼容现有插件调用方式。"""
if not self.wxid: