rename dc_chat_get_mute_duration

to dc_chat_get_remaining_mute_duration
This commit is contained in:
Simon Laux
2020-02-08 13:07:43 +01:00
parent e04d28c885
commit 1fb75c1af3
3 changed files with 4 additions and 4 deletions

View File

@@ -2952,7 +2952,7 @@ int dc_chat_is_muted (const dc_chat_t* chat);
* @param chat The chat object. * @param chat The chat object.
* @return 0=not muted, -1=forever muted, (x>0)=remaining seconds until the mute is lifted * @return 0=not muted, -1=forever muted, (x>0)=remaining seconds until the mute is lifted
*/ */
int64_t dc_chat_get_mute_duration (const dc_chat_t* chat); int64_t dc_chat_get_remaining_mute_duration (const dc_chat_t* chat);
/** /**

View File

@@ -2523,9 +2523,9 @@ pub unsafe extern "C" fn dc_chat_is_muted(chat: *mut dc_chat_t) -> libc::c_int {
} }
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn dc_chat_get_mute_duration(chat: *mut dc_chat_t) -> i64 { pub unsafe extern "C" fn dc_chat_get_remaining_mute_duration(chat: *mut dc_chat_t) -> i64 {
if chat.is_null() { if chat.is_null() {
eprintln!("ignoring careless call to dc_chat_get_mute_duration()"); eprintln!("ignoring careless call to dc_chat_get_remaining_mute_duration()");
return 0; return 0;
} }
let ffi_chat = &*chat; let ffi_chat = &*chat;

View File

@@ -123,7 +123,7 @@ class Chat(object):
:param duration: :param duration:
:returns: Returns the number of seconds the chat is still muted for. (0 for not muted, -1 forever muted) :returns: Returns the number of seconds the chat is still muted for. (0 for not muted, -1 forever muted)
""" """
return bool(lib.dc_chat_get_mute_duration(self.id)) return bool(lib.dc_chat_get_remaining_mute_duration(self.id))
def get_type(self): def get_type(self):
""" return type of this chat. """ return type of this chat.