Skip to content

Commit

Permalink
expose dc_msg_force_sticker to ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Dec 20, 2024
1 parent 6de5e9d commit f159d3e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deltachat-ffi/deltachat.h
Original file line number Diff line number Diff line change
Expand Up @@ -4886,6 +4886,8 @@ dc_msg_t* dc_msg_get_parent (const dc_msg_t* msg);
*/
void dc_msg_force_plaintext (dc_msg_t* msg);

void dc_msg_force_sticker (dc_msg_t* msg);

/**
* @class dc_contact_t
*
Expand Down
10 changes: 10 additions & 0 deletions deltachat-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4032,6 +4032,16 @@ pub unsafe extern "C" fn dc_msg_force_plaintext(msg: *mut dc_msg_t) {
ffi_msg.message.force_plaintext();
}

#[no_mangle]
pub unsafe extern "C" fn dc_msg_force_sticker(msg: *mut dc_msg_t) {
if msg.is_null() {
eprintln!("ignoring careless call to dc_msg_force_plaintext()");
return;
}
let ffi_msg = &mut *msg;
ffi_msg.message.force_sticker();
}

// dc_contact_t

/// FFI struct for [dc_contact_t]
Expand Down

0 comments on commit f159d3e

Please sign in to comment.