responsiveness fix
This commit is contained in:
parent
4ad05bf137
commit
f7a4753217
9 changed files with 396 additions and 13 deletions
|
|
@ -19,6 +19,7 @@ from app.services.human_handoff_service import (
|
|||
maybe_trigger_handoff,
|
||||
process_human_reply,
|
||||
resolve_handoff_from_inbound,
|
||||
start_human_initiated_handoff,
|
||||
)
|
||||
from app.services.message_ids import canonical_message_id, message_id_fields
|
||||
from app.services.mime_parser import parse_mime
|
||||
|
|
@ -154,6 +155,23 @@ class InboundHandler:
|
|||
references=parsed.get("references", []),
|
||||
)
|
||||
if handoff is None:
|
||||
started = await start_human_initiated_handoff(
|
||||
mongo_db,
|
||||
account_id=account_id,
|
||||
agent_email=recipient,
|
||||
parsed=parsed,
|
||||
body_text=body_text,
|
||||
body_html=body_html,
|
||||
raw_mime=raw_mime,
|
||||
delivery_key=delivery_key,
|
||||
)
|
||||
if started:
|
||||
logger.info(
|
||||
"handoff_initiated_from_human account_id=%s message_id=%s",
|
||||
account_id,
|
||||
internet_message_id,
|
||||
)
|
||||
continue
|
||||
external_recipients.append(recipient)
|
||||
continue
|
||||
await process_human_reply(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue