fix: preserve Chatwoot message visibility and identity
This commit is contained in:
@@ -416,7 +416,11 @@ async def process_saved_chatwoot_raw_event(raw_event_id: str, payload: Dict[str,
|
||||
contact_id=extracted["contact_id"],
|
||||
)
|
||||
|
||||
response = await analyze(analyze_request, raw_event_id=raw_event_id)
|
||||
response = await analyze(
|
||||
analyze_request,
|
||||
raw_event_id=raw_event_id,
|
||||
source_event_id=extracted.get("source_event_id"),
|
||||
)
|
||||
|
||||
chatwoot_note_result = {
|
||||
"status": "skipped",
|
||||
@@ -429,11 +433,14 @@ async def process_saved_chatwoot_raw_event(raw_event_id: str, payload: Dict[str,
|
||||
action_result=response.action_result,
|
||||
)
|
||||
|
||||
ignored_action = str(response.action_result.action_code or "").upper() in {
|
||||
"IGNORE_BOUNCE", "IGNORE_SPAM", "SPAM",
|
||||
}
|
||||
mark_raw_event_processed(
|
||||
raw_event_id=raw_event_id,
|
||||
action_run_id=response.action_run_id,
|
||||
message_id=response.message_id,
|
||||
ignored=False,
|
||||
ignored=ignored_action,
|
||||
error=None,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user