落地海运协同群:测服靠会话存档听群话,报价单能带上协同字段。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -53,6 +53,15 @@ def parse_plain_xml(xml_text: str, *, default_agent_id: str = "") -> InboundMess
|
||||
if chat_id:
|
||||
chat_type = "group"
|
||||
|
||||
media: dict[str, object] = {}
|
||||
if msg_type.lower() in {"file", "image", "video"}:
|
||||
media = {
|
||||
"media_id": _text(root, "MediaId") or _text(root, "MediaID"),
|
||||
"filename": _text(root, "FileName") or _text(root, "Title"),
|
||||
"file_ext": _text(root, "FileExt"),
|
||||
"content_type": "",
|
||||
}
|
||||
|
||||
return InboundMessage(
|
||||
sender_id=sender_id,
|
||||
message_id=msg_id,
|
||||
@@ -62,7 +71,7 @@ def parse_plain_xml(xml_text: str, *, default_agent_id: str = "") -> InboundMess
|
||||
chat_type=chat_type,
|
||||
agent_id=agent_id,
|
||||
create_time=create_time,
|
||||
media={},
|
||||
media=media,
|
||||
raw={
|
||||
"event": event,
|
||||
"event_key": event_key,
|
||||
|
||||
Reference in New Issue
Block a user