feat(send_message): add Discord media attachment support#10193
Closed
sprmn24 wants to merge 1 commit into
Closed
Conversation
Previously send_message only supported media delivery for Telegram. Discord users received a warning that media was omitted. - Add media_files parameter to _send_discord() - Upload media via Discord multipart/form-data API (files[0] field) - Handle Discord in _send_to_platform() same way as Telegram block - Remove Discord from generic chunk loop (now handled above) - Update error/warning strings to mention telegram and discord
Contributor
|
Merged via PR #10246. Your commit was cherry-picked onto current main with your authorship preserved in git log. Follow-up fixes added: file handle bug (POST was outside the |
Contributor
Author
|
Thanks for the fixes and the detailed follow-up 🙏 |
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.
What does this PR do?
Adds native media delivery to
send_messagefor Discord, bringing it to parity with Telegram.Before this PR, any MEDIA tag in a Discord-targeted
send_messagecall was silently dropped with a warning. Now images, videos, audio, and documents are uploaded via Discord's multipart/form-data API.Type of Change
Changes Made
_send_discord(): addedmedia_filesparameter; uploads each file as a separatefiles[0]multipart POST_send_to_platform(): Discord now has its own pre-loop block (same pattern as Telegram) somedia_filesare passed only on the last chunkHow to Test
Ask the agent to send an image to a Discord channel via
send_message. Previously the image would be omitted; now it appears as an attachment.Checklist