diff --git a/deltachat-jsonrpc/src/api.rs b/deltachat-jsonrpc/src/api.rs index 4ad331cff..a4102fc25 100644 --- a/deltachat-jsonrpc/src/api.rs +++ b/deltachat-jsonrpc/src/api.rs @@ -2276,6 +2276,37 @@ 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 + /// Send a message to a chat. + /// + /// This function returns after the message has been placed in the sending queue. + /// This does not imply that the message was really sent out yet. + /// However, from your view, you're done with the message. + /// Sooner or later it will find its way. + /// + /// **Attaching files:** + /// + /// Pass the file path in the `file` parameter. + /// If `file` is not in the blob directory yet, + /// it will be copied into the blob directory. + /// If you want, you can delete the file immediately after this function returns. + /// + /// You can also write the attachment directly into the blob directory + /// and then pass the path as the `file` parameter; + /// this will prevent an unnecessary copying of the file. + /// + /// In `filename`, you can pass the original name of the file, + /// which will then be shown in the UI. + /// in this case the current name of `file` on the filesystem will be ignored. + /// + /// In order to deduplicate files that contain the same data, + /// the file will be named `.`, e.g. `ce940175885d7b78f7b7e9f1396611f.jpg`. + /// + /// NOTE: + /// - This function will rename the file. To get the new file path, call `get_file()`. + /// - The file must not be modified after this function was called. + /// - Images etc. will NOT be recoded. + /// In order to recode images, + /// use `misc_set_draft` and pass `Image` as the viewtype. #[expect(clippy::too_many_arguments)] async fn misc_send_msg( &self, diff --git a/deltachat-jsonrpc/src/api/types/login_param.rs b/deltachat-jsonrpc/src/api/types/login_param.rs index 5b94b4e90..6036709cd 100644 --- a/deltachat-jsonrpc/src/api/types/login_param.rs +++ b/deltachat-jsonrpc/src/api/types/login_param.rs @@ -5,7 +5,9 @@ use serde::Serialize; use yerpc::TypeDef; /// Login parameters entered by the user. - +/// +/// Usually it will be enough to only set `addr` and `password`, +/// and all the other settings will be autoconfigured. #[derive(Serialize, Deserialize, TypeDef, schemars::JsonSchema)] #[serde(rename_all = "camelCase")] pub struct EnteredLoginParam {