#976 微信对话同步WebClaw修复 + admin连接时间统一北京时间
CI / gate (push) Has been cancelled

1.mirror_to_ai_chat: _uuid→uuid(NameError被except吞了, 对话从未同步到webclaw) 2.im_bot_admin加_beijing_now并替换5处datetime.now()(容器UTC存naive时间前端按+08:00展示错位8小时)
This commit is contained in:
qihu-bot committed 2026-08-18 13:47:07 +08:00
1 parent f975672b0e
commit ab11283d92
2 files changed
+14 -6

No files matched your search

+2 -2
View File
@@ -551,7 +551,7 @@ def _get_or_create_wechat_conv(db: Session, user_id: str) -> str:
), {"uid": user_id})
if rows:
return _row_to_dict(rows[0])["id"]
cid = str(_uuid.uuid4())
cid = str(uuid.uuid4())
now = _beijing_now()
_execute_raw(db, text(
"INSERT INTO conversations "
@@ -566,7 +566,7 @@ def _append_ai_message(db: Session, conv_id: str, role: str, content: str, creat
"INSERT INTO messages (id, conversation_id, role, content, token_used, created_at) "
"VALUES (:id, :cid, :role, :content, 0, :c)"
), {
"id": str(_uuid.uuid4()), "cid": conv_id, "role": role,
"id": str(uuid.uuid4()), "cid": conv_id, "role": role,
"content": content, "c": created or _beijing_now(),
})