feat(login): emit login and online status events

This commit is contained in:
2026-07-10 12:16:27 +08:00
parent 2f4783f1f9
commit 1d2948677e
4 changed files with 73 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ def test_login_flow():
assert r.status_code == 200
assert r.json()["login_status"] == "pending"
r = client.post("/v1/wechat-personal/login/bot-001/confirm")
r = client.post("/v1/wechat-personal/login/bot-001/confirm", json={})
assert r.status_code == 200
assert r.json()["success"] is True
@@ -35,7 +35,7 @@ def test_login_flow():
def test_send_after_login():
client.post("/v1/wechat-personal/login/start", json={"account_id": "bot-002"})
client.post("/v1/wechat-personal/login/bot-002/confirm")
client.post("/v1/wechat-personal/login/bot-002/confirm", json={})
r = client.post("/v1/wechat-personal/send/text", json={
"account_id": "bot-002",