fix(gateway): classify SimpleX non-image/non-audio files as DOCUMENT

SimpleX tagged unknown files application/octet-stream in media_types
but classification only handled audio/image, leaving msg_type TEXT —
run.py never injected the document context. Same bug class as #12845.
This commit is contained in:
Teknium 2026-06-11 22:58:34 -07:00
parent f03f161b39
commit 74180ebf0b
2 changed files with 76 additions and 0 deletions

View file

@ -625,6 +625,11 @@ class SimplexAdapter(BasePlatformAdapter):
msg_type = MessageType.VOICE
elif any(mt.startswith("image/") for mt in media_types):
msg_type = MessageType.PHOTO
else:
# Catch-all: non-image/non-audio files (tagged
# application/octet-stream above) are documents so run.py's
# document-context injection surfaces the file to the agent.
msg_type = MessageType.DOCUMENT
# Timestamp
ts_str = meta.get("itemTs") or meta.get("createdAt", "")