Skip to content

fix(mattermost): use MIME types for media attachments#2329

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-40b195db
Mar 21, 2026
Merged

fix(mattermost): use MIME types for media attachments#2329
teknium1 merged 1 commit intomainfrom
hermes/hermes-40b195db

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Salvage of PR #1751 by @Himess (198 commits behind, cherry-picked cleanly).

Mattermost file attachments were silently dropped from vision and STT processing. The adapter appended bare category strings ("image", "audio", "document") to media_types, but downstream checks in run.py use mtype.startswith("image/") which never matched.

Fix: use the actual MIME type (mime variable, already available from file_info.get("mime_type")) instead of bare category strings. Three lines changed.

3 new tests verify full MIME types are propagated for image, audio, and document attachments. 40 mattermost tests pass.

Bare strings like "image", "audio", "document" were appended to
media_types, but downstream run.py checks mtype.startswith("image/")
and mtype.startswith("audio/"), which never matched. This caused all
Mattermost file attachments to be silently dropped from vision/STT
processing. Use the actual MIME type from file_info instead.
@teknium1 teknium1 merged commit 07112e4 into main Mar 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants