1. 扫码确认那一刻页面报「服务器内部错误」:`bot_channel` 的轮询口子直接
`current_setting('app.bot_channel', true)::uuid`,而事务级 set_config 提交后
会把连接上的变量还原成空串而不是 NULL,空串 cast 就 InvalidTextRepresentation。
迁移 0015 改成 nullif(...,'')::uuid,与 app_ws_id() 同一写法。
2. 微信回话只回「已保存任务:…」/「已保存知识草稿:…」,不再带站点链接
(PUBLIC_BASE_URL 是内网地址,手机上打不开)。
3. 栏目名「接入」改名「机器人」;页面标题与提示文案同步。
pytest 151 passed;ruff check/format 干净;tsc 0;vite build 通过;
web/e2e/integrations.mjs 7 项全绿。
This commit is contained in:
@@ -176,7 +176,9 @@ async def test_plain_text_becomes_task(client: AsyncClient) -> None:
|
||||
await session.commit()
|
||||
|
||||
assert result["action"] == "task"
|
||||
assert "已记下任务" in result["reply"]
|
||||
# 回话里只确认"收下了",不带站点链接(站点地址在手机上不一定打得开)
|
||||
assert result["reply"] == "已保存任务:给客户回电话"
|
||||
assert "http" not in result["reply"]
|
||||
async with SessionFactory() as session:
|
||||
await bind_tenant(session, ws_id, uuid.UUID(user["user_id"]))
|
||||
item = await session.get(Item, result["item_id"])
|
||||
@@ -207,6 +209,7 @@ async def test_knowledge_prefix_creates_draft_with_tags(client: AsyncClient) ->
|
||||
await session.commit()
|
||||
|
||||
assert result["action"] == "knowledge"
|
||||
assert result["reply"] == "已保存知识草稿:回滚前先停灰度"
|
||||
async with SessionFactory() as session:
|
||||
await bind_tenant(session, ws_id, uuid.UUID(user["user_id"]))
|
||||
item = await session.get(Item, result["item_id"])
|
||||
@@ -279,7 +282,7 @@ async def test_poller_handles_message_once_and_replies(
|
||||
|
||||
assert len(replies) == 1
|
||||
assert replies[0][0] == "wx-user-9"
|
||||
assert "已记下任务" in replies[0][1]
|
||||
assert replies[0][1] == "已保存任务:整理一下本周排期"
|
||||
|
||||
async with SessionFactory() as session:
|
||||
await session.execute(
|
||||
|
||||
Reference in New Issue
Block a user