Add rooms_media_confirm and improve rooms_media input flexibility#382
Merged
jadolg merged 3 commits intojadolg:masterfrom Apr 22, 2026
Merged
Add rooms_media_confirm and improve rooms_media input flexibility#382jadolg merged 3 commits intojadolg:masterfrom
jadolg merged 3 commits intojadolg:masterfrom
Conversation
rooms_media now accepts a tuple/list file payload directly or a file path string as before.
Owner
|
Hey @ErfanBahramali, |
jadolg
requested changes
Apr 20, 2026
|
jadolg
approved these changes
Apr 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.



This change was made because the Rocket.Chat media upload API uses a two-step process: first upload and then confirm. Without rooms_media_confirm, the file gets uploaded, but the message finalization is not completed.
https://developer.rocket.chat/apidocs/check-uploaded-file
At the same time, rooms_media was updated to accept not only file paths but also pre-built tuple/list inputs, enabling direct sending of bytes and streams. This improves client flexibility, removes the need for temporary files, and provides better compatibility with real-world scenarios.
Another important benefit is that backward compatibility is preserved, and the changes are covered with tests to ensure no regression issues occur.