mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
rename dc_chat_get_mute_duration
to dc_chat_get_remaining_mute_duration
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user