Skip to content

Conversation

@capcom6
Copy link
Contributor

@capcom6 capcom6 commented Jan 23, 2025

Problem

Currently, the action fails with a 400 response code when using flags. This limitation makes it impossible to send messages with links without embedding them, which can be controlled by the SUPPRESS_EMBEDS flag.

Solution

Include message flags in the request payload when sending as JSON, not only multipart/form-data.

Changes

  • Included flags and thread_name in TOP_LEVEL_WEBHOOK_KEYS
  • Removed conditions on flags and threadName for multipart/form-data method
  • Added test for SUPPRESS_EMBEDS flag

Testing

  • Tested sending a message with SUPPRESS_EMBEDS flag
  • Verified that links in the message are not embedded when the flag is set
  • Ensured existing tests pass

Additional Notes

This change enhances the flexibility of the action, allowing users to have more control over message appearance and behavior.

@capcom6 capcom6 changed the title Add support for message flags without file attachment Fix support for message flags Jan 23, 2025
@capcom6 capcom6 force-pushed the bugfix/flags-without-file-support branch from c35a85a to bb56609 Compare January 24, 2025 06:46
@zbee
Copy link

zbee commented Feb 28, 2025

Would love to see this implemented as well.

@capcom6
Copy link
Contributor Author

capcom6 commented Feb 28, 2025

@zbee , for now you can use updated version from my repository capcom6/discord-webhook@bb566093b4c61a091803d7b7564ff09a99ea2838

@tsickert
Copy link
Owner

tsickert commented Mar 1, 2025

Sincere apologies for the delayed review, thanks so much for the contribution! 🙏

@tsickert tsickert merged commit a6063e6 into tsickert:master Mar 1, 2025
2 checks passed
@tsickert
Copy link
Owner

tsickert commented Mar 1, 2025

v7.0.0 is released with these changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants