Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for adding attachments in message edits (#1378)
This commit makes it possible to add new attachments to a message when editing it. This commit: - creates a new method `Http::edit_message_and_attachments` (that method is to `edit_message` what `send_files` is to `send_message`); - there's a lot of duplication between that new method and `Http::edit_message_and_attachments` and `Http::send_files`, but I don't know enough about serenity's http design to improve the situation; - changes calls of `Http::edit_message` to `Http::edit_message_and_attachments` where appropriate; - creates a new method `EditMessage::attachment` to add a new attachment; - adds a new field to `EditMessage` which stores new attachments (breaking change); - adds a lifetime parameter to `EditMessage` (breaking change); - moves the `AttachmentType` serialization into an HTTP form part into a function to avoid code duplication.
- Loading branch information
Showing
7 changed files
with
128 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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