You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deltachat-jsonrpc/src/api.rs
+31Lines changed: 31 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2276,6 +2276,37 @@ impl CommandApi {
2276
2276
2277
2277
// mimics the old desktop call, will get replaced with something better in the composer rewrite,
2278
2278
// 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
2279
+
/// Send a message to a chat.
2280
+
///
2281
+
/// This function returns after the message has been placed in the sending queue.
2282
+
/// This does not imply that the message was really sent out yet.
2283
+
/// However, from your view, you're done with the message.
2284
+
/// Sooner or later it will find its way.
2285
+
///
2286
+
/// **Attaching files:**
2287
+
///
2288
+
/// Pass the file path in the `file` parameter.
2289
+
/// If `file` is not in the blob directory yet,
2290
+
/// it will be copied into the blob directory.
2291
+
/// If you want, you can delete the file immediately after this function returns.
2292
+
///
2293
+
/// You can also write the attachment directly into the blob directory
2294
+
/// and then pass the path as the `file` parameter;
2295
+
/// this will prevent an unnecessary copying of the file.
2296
+
///
2297
+
/// In `filename`, you can pass the original name of the file,
2298
+
/// which will then be shown in the UI.
2299
+
/// in this case the current name of `file` on the filesystem will be ignored.
2300
+
///
2301
+
/// In order to deduplicate files that contain the same data,
2302
+
/// the file will be named `<hash>.<extension>`, e.g. `ce940175885d7b78f7b7e9f1396611f.jpg`.
2303
+
///
2304
+
/// NOTE:
2305
+
/// - This function will rename the file. To get the new file path, call `get_file()`.
2306
+
/// - The file must not be modified after this function was called.
2307
+
/// - Images etc. will NOT be recoded.
2308
+
/// In order to recode images,
2309
+
/// use `misc_set_draft` and pass `Image` as the viewtype.
0 commit comments