-
-
Notifications
You must be signed in to change notification settings - Fork 90
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: Deduplicate blob files in the JsonRPC API #6470
base: main
Are you sure you want to change the base?
Conversation
0d5c3ad
to
7663144
Compare
@@ -2157,12 +2157,14 @@ impl CommandApi { | |||
|
|||
// mimics the old desktop call, will get replaced with something better in the composer rewrite, | |||
// the better version will just be sending the current draft, though there will be probably something similar with more options to this for the corner cases like setting a marker on the map | |||
#[allow(clippy::too_many_arguments)] | |||
async fn misc_send_msg( |
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.
Not sure whether it's necessary to change this function and misc_set_draft()
since it's going to be replaced anyway?
Is this function and misc_set_draft()
still in use in the Desktop UI?
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.
Currently it is still used, did a quick grep for miscSetDraft
.
Co-authored-by: l <[email protected]>
This makes it so that files will be deduplicated when using the JsonRPC API.
Desktop issue: deltachat/deltachat-desktop#4498
@nicodh and @WofWca you know the Desktop code and how it is using the API, so, you can probably tell me whether this is a good way of changing the JsonRPC code - feel free to push changes directly to this PR here!
There is no need to rush merging this PR; if you want, you can first concentrate on the tasks described in the desktop issue.
This PR here changes the existing functions instead of creating new ones; we can alternatively create new ones if it allows for a smoother transition.
This brings a few changes:
<hash>.<extension>
immediately (previously, the filename on the disk stayed the same)create_message()
and similar, it's better to directly create it in the blobdir, since it doesn't need to be copied.set_file_and_deduplicate()
that replaces the file on an existing message.Not sure if there is any documentation of the JsonRPC API that needs to be changed?
Core issue: #6265