fix(chat,channels): admin session delete, weixin inbound, PG and docs

- List/delete chat sessions for administrator by username (cross-tenant UUID)

- Return 404 when delete does not remove a session; add tests

- Weixin: dispatch lang, inbound attachments, reply persist, native reply timeout

- PG compat scrub and administrator session delete repo path

- RUNBOOK: WhatsApp re-bind with Remove-Item auth; weixin poll diag scripts

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-06-03 01:36:45 +08:00
parent 39fd1905b6
commit bc1b45a8fd
20 changed files with 1056 additions and 86 deletions

View file

@ -44,3 +44,9 @@ def test_scrub_nul_bytes_from_text() -> None:
def test_scrub_nul_bytes_from_jsonable_nested() -> None:
assert pg_compat.scrub_nul_bytes_from_jsonable({"x": "y\x00z"}) == {"x": "yz"}
def test_escape_percent_in_sql_literals_for_like_b64_prefix() -> None:
sql = "SELECT 1 FROM llm_profile WHERE api_key LIKE 'b64:%'"
adapted = pg_compat.adapt_sql_for_postgres(sql)
assert "LIKE 'b64:%%'" in adapted