human hand off bug

This commit is contained in:
debu-2 2026-10-06 18:27:06 +05:30
parent 223f846782
commit 6e7a0b9539
22 changed files with 1040 additions and 336 deletions

View file

@ -72,10 +72,10 @@ async def list_handoff_rules(
def _handoff_status_label(value: str) -> str:
return {
"ACTIVE": "Active",
"ACTIVE": "Open",
"WAITING_FOR_HUMAN": "Waiting for human",
"HUMAN_REPLIED": "Human replied",
"CLOSED": "Closed",
"CLOSED": "Resolved",
}.get(value, value.replace("_", " ").title())
@ -125,6 +125,7 @@ async def list_handoff_conversations(
external_subject=handoff.get("external_subject", ""),
external_sender=handoff.get("external_sender", ""),
human_email=handoff.get("human_email", ""),
human_name=handoff.get("human_name", ""),
status=handoff.get("status", "ACTIVE"),
status_label=_handoff_status_label(
handoff.get("status", "ACTIVE")