fix(gateway): add .md/.markdown to MEDIA regex extension whitelist#30106
Closed
coe0718 wants to merge 1 commit into
Closed
fix(gateway): add .md/.markdown to MEDIA regex extension whitelist#30106coe0718 wants to merge 1 commit into
coe0718 wants to merge 1 commit into
Conversation
The MEDIA extraction regex was tightened in ea49b38 to require an explicit extension whitelist instead of the previous catch-all \S+ pattern, but the whitelist omitted .md and .markdown files. This caused MEDIA:/path/to/file.md tags to be silently stripped from messages without uploading the file — the tag was removed from display text but never matched by extract_media(), so no attachment was created. Add md|markdown alongside the existing text-based extensions (txt|csv).
Collaborator
Author
|
Sorry didn’t see those, closed |
This was referenced May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MEDIA extraction regex was tightened in
ea49b3862to require an explicit extension whitelist instead of the previous catch-all\S+pattern, but the whitelist omitted.mdand.markdownfiles.This causes
MEDIA:/path/to/file.mdtags to be silently stripped from messages without uploading the file — the tag is removed from display text but never matched byextract_media(), so no Discord/Telegram/etc. attachment is created.Simple fix: add
md|markdownalongside the existing text-based extensions (txt|csv).3 lines changed across 2 files (
gateway/platforms/base.py+gateway/run.py).Tested locally — applying the fix restores
.mdfile delivery immediately.