Release v4928.1.4.2 stable

This commit is contained in:
2026-06-09 22:55:58 +01:00
commit 6445044ac6
280 changed files with 41775 additions and 0 deletions

23
app/posting_policy.py Normal file
View File

@@ -0,0 +1,23 @@
from app.schemas import ActionResult
def can_post_private_note(action_result: ActionResult) -> bool:
"""
Política de segurança para escrever notas privadas no Chatwoot.
Só permite publicar notas para ações realmente operacionais.
Bloqueia spam, revisão manual e ações sem necessidade operacional.
"""
if not action_result.safe_to_post:
return False
if not action_result.action_required:
return False
if action_result.route in {"spam", "rever"}:
return False
if not str(action_result.action or "").strip():
return False
return True