Convert Markdown to WhatsApp formatting on outbound enqueue.

LLM replies keep **/#/tables in admin history; WhatsApp queue text is rewritten to *bold*, plain links, and bullet rows (disable with AIA_WHATSAPP_MARKDOWN_CONVERT=0).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-11 00:16:02 +08:00
parent 9d4dced4e4
commit cc9a516cb4
4 changed files with 333 additions and 1 deletions

View file

@ -6,13 +6,16 @@ from .api import (
normalize_whatsapp_allow_from_entries,
normalize_whatsapp_target,
)
from .formatting import markdown_to_whatsapp_text, prepare_whatsapp_outbound_text
__all__ = [
"WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS",
"is_whatsapp_group_jid",
"is_whatsapp_user_target",
"looks_like_whatsapp_target_id",
"markdown_to_whatsapp_text",
"normalize_whatsapp_allow_from_entries",
"normalize_whatsapp_target",
"prepare_whatsapp_outbound_text",
]