-
Notifications
You must be signed in to change notification settings - Fork 334
feat!(timeline): Allow to send attachments from bytes #4451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!(timeline): Allow to send attachments from bytes #4451
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4451 +/- ##
==========================================
- Coverage 85.06% 85.05% -0.01%
==========================================
Files 283 283
Lines 31748 31766 +18
==========================================
+ Hits 27005 27019 +14
- Misses 4743 4747 +4 ☔ View full report in Codecov by Sentry. |
…chment filename Since we need a String as final type, this can avoid to allocate a string if the provided type is already a String. Signed-off-by: Kévin Commaille <[email protected]>
Sometimes we can get the bytes directly. It avoids to have to write the data to a temporary file only to have the data loaded back in memory right after. Signed-off-by: Kévin Commaille <[email protected]>
c47466a
to
2a0973f
Compare
Added changelog entries in the commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks!
Once the conflict with |
I merged main into this branch to solve the conflict. Maybe you would have preferred a rebase to keep the history clean? |
Thanks. It's rather up to you:
So unless you have a strong preference for rebase-and-merge here (in which case, yes, please keep a clean history), I'll squash-merge later 👍 |
It's fine, you can merge as is 🙂 . |
Sometimes we can get the bytes directly, e.g. in Fractal we can get an image from the clipboard. It avoids to have to write the data to a temporary file only to have the data loaded back in memory by the SDK right after. The first commit to accept any type that implements `Into<String>` for the filename is grouped here because it simplifies slightly the second commit. Note that we could also use `AttachmentSource` in the other `send_attachment` APIs, on `Room` and `RoomSendQueue`, for consistency. --------- Signed-off-by: Kévin Commaille <[email protected]>
Sometimes we can get the bytes directly, e.g. in Fractal we can get an image from the clipboard. It avoids to have to write the data to a temporary file only to have the data loaded back in memory by the SDK right after.
The first commit to accept any type that implements
Into<String>
for the filename is grouped here because it simplifies slightly the second commit.Note that we could also use
AttachmentSource
in the othersend_attachment
APIs, onRoom
andRoomSendQueue
, for consistency.