fix(media): gate markdown image extraction by channel (#72718)

Closes #72642

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Bartok
2026-04-27 06:27:35 -04:00
committed by GitHub
parent 775ed36c16
commit f0b327cf68
15 changed files with 251 additions and 30 deletions

View File

@@ -17,6 +17,10 @@ Remote `MEDIA:` attachments must be public `https:` URLs. Plain `http:`,
loopback, link-local, private, and internal hostnames are ignored as attachment
directives; server-side media fetchers still enforce their own network guards.
Plain Markdown image syntax stays text by default. Channels that intentionally
map Markdown image replies to media attachments opt in at their outbound
adapter; Telegram does this so `![alt](url)` can still become a media reply.
These directives are separate. `MEDIA:` and reply/voice tags remain delivery metadata; `[embed ...]` is the web-only rich render path.
Trusted tool-result media uses the same `MEDIA:` / `[[audio_as_voice]]` parser before delivery, so text tool outputs can still mark an audio attachment as a voice note.