diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index a76ef367c..56918e8d0 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -2766,7 +2766,7 @@ int dc_chat_is_device_talk (const dc_chat_t* chat); * @param chat The chat object. * @return 1=chat is writable, 0=chat is not writable */ -int dc_chat_is_writable (const dc_chat_t* chat); +int dc_chat_can_send (const dc_chat_t* chat); /** diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index 8771e4a0c..6c52f09ca 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -2292,13 +2292,13 @@ pub unsafe extern "C" fn dc_chat_is_device_talk(chat: *mut dc_chat_t) -> libc::c } #[no_mangle] -pub unsafe extern "C" fn dc_chat_is_writable(chat: *mut dc_chat_t) -> libc::c_int { +pub unsafe extern "C" fn dc_chat_can_send(chat: *mut dc_chat_t) -> libc::c_int { if chat.is_null() { - eprintln!("ignoring careless call to dc_chat_is_writable()"); + eprintln!("ignoring careless call to dc_chat_can_send()"); return 0; } let ffi_chat = &*chat; - ffi_chat.chat.is_writable() as libc::c_int + ffi_chat.chat.can_send() as libc::c_int } #[no_mangle] diff --git a/src/chat.rs b/src/chat.rs index 50debaada..d21f4333e 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -115,7 +115,7 @@ impl Chat { self.param.exists(Param::Devicetalk) } - pub fn is_writable(&self) -> bool { + pub fn can_send(&self) -> bool { self.id > DC_CHAT_ID_LAST_SPECIAL && !self.is_device_talk() }