target comments of @flub

This commit is contained in:
B. Petersen
2019-11-04 23:04:12 +01:00
committed by holger krekel
parent f8afefa2c1
commit 4c30bf80ce
3 changed files with 5 additions and 5 deletions

View File

@@ -2766,7 +2766,7 @@ int dc_chat_is_device_talk (const dc_chat_t* chat);
* @param chat The chat object. * @param chat The chat object.
* @return 1=chat is writable, 0=chat is not writable * @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);
/** /**

View File

@@ -2292,13 +2292,13 @@ pub unsafe extern "C" fn dc_chat_is_device_talk(chat: *mut dc_chat_t) -> libc::c
} }
#[no_mangle] #[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() { if chat.is_null() {
eprintln!("ignoring careless call to dc_chat_is_writable()"); eprintln!("ignoring careless call to dc_chat_can_send()");
return 0; return 0;
} }
let ffi_chat = &*chat; let ffi_chat = &*chat;
ffi_chat.chat.is_writable() as libc::c_int ffi_chat.chat.can_send() as libc::c_int
} }
#[no_mangle] #[no_mangle]

View File

@@ -115,7 +115,7 @@ impl Chat {
self.param.exists(Param::Devicetalk) 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() self.id > DC_CHAT_ID_LAST_SPECIAL && !self.is_device_talk()
} }