feat(send): async acceptance and send_result event

This commit is contained in:
2026-07-10 12:18:54 +08:00
parent 1d2948677e
commit 1641553d31
4 changed files with 185 additions and 22 deletions

View File

@@ -40,10 +40,11 @@ def test_send_after_login():
r = client.post("/v1/wechat-personal/send/text", json={
"account_id": "bot-002",
"conversation_id": "room-001",
"text": "hello"
"text": "hello",
"record_id": "rec-001",
})
assert r.status_code == 200
assert r.json()["success"] is True
assert r.json()["accepted"] is True
assert r.json()["message_id"]
@@ -51,10 +52,11 @@ def test_send_without_login_fails():
r = client.post("/v1/wechat-personal/send/text", json={
"account_id": "bot-offline",
"conversation_id": "room-001",
"text": "hello"
"text": "hello",
"record_id": "rec-offline",
})
assert r.status_code == 200
assert r.json()["success"] is False
assert r.json()["accepted"] is False
def test_heartbeat_and_monitor():