add dc_msg_set_override_sender_name() api

with mailinglists, we already receive and handle per-message-names,
this api allows this also eg. for bots based on the deltachat api.
This commit is contained in:
B. Petersen
2021-02-14 00:21:22 +01:00
committed by bjoern
parent 57841cdcc0
commit 5c684eb3c1
4 changed files with 83 additions and 1 deletions

View File

@@ -3028,6 +3028,21 @@ pub unsafe extern "C" fn dc_msg_set_html(msg: *mut dc_msg_t, html: *const libc::
ffi_msg.message.set_html(to_opt_string_lossy(html))
}
#[no_mangle]
pub unsafe extern "C" fn dc_msg_set_override_sender_name(
msg: *mut dc_msg_t,
name: *const libc::c_char,
) {
if msg.is_null() {
eprintln!("ignoring careless call to dc_msg_set_override_sender_name()");
return;
}
let ffi_msg = &mut *msg;
ffi_msg
.message
.set_override_sender_name(to_opt_string_lossy(name))
}
#[no_mangle]
pub unsafe extern "C" fn dc_msg_set_file(
msg: *mut dc_msg_t,