feat(api): GET /api/export/chat-html — 导出 1:1/群聊天为 HTML

支持 DM(talker_id) 与 群(room_id),可选 start/end 时间范围;
is_send 决定气泡左右。对齐云客微信客户/群列表「导出HTML聊天记录」。

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-06 17:19:46 +08:00
parent bfdb5852bb
commit d85bf64dde
3 changed files with 158 additions and 0 deletions
+3
View File
@@ -17,6 +17,7 @@ Includes:
* ``GET /api/sms`` (see :mod:`app.api.routers.sms`).
* ``GET /api/sync/status`` (see :mod:`app.api.routers.sync`).
* ``GET /api/search`` (see :mod:`app.api.routers.search`).
* ``GET /api/export/chat-html`` (see :mod:`app.api.routers.export`).
CORS is configured permissively (wildcard origin, no credentials) so the local
frontend can call the API during development.
@@ -38,6 +39,7 @@ from app.api.auth import require_auth
from app.api.routers import (
calls,
customer,
export,
groups,
media,
messages,
@@ -65,6 +67,7 @@ app.include_router(calls.router)
app.include_router(sms.router)
app.include_router(sync.router)
app.include_router(search.router)
app.include_router(export.router)
@app.get("/api/health")