fix naming

This commit is contained in:
Simon Laux
2020-02-09 10:42:32 +01:00
parent 4acb37156f
commit 5f4274b449
3 changed files with 6 additions and 6 deletions

View File

@@ -1581,7 +1581,7 @@ int dc_set_chat_profile_image (dc_context_t* context, uint32_t ch
/** /**
* Set mute duration of a chat. * Set mute duration of a chat.
* *
* This value can be checked by the ui upon recieving a new message to decide whether it should trigger an notification. * This value can be checked by the ui upon receiving a new message to decide whether it should trigger an notification.
* *
* Sends out #DC_EVENT_CHAT_MODIFIED. * Sends out #DC_EVENT_CHAT_MODIFIED.
* *
@@ -1591,7 +1591,7 @@ int dc_set_chat_profile_image (dc_context_t* context, uint32_t ch
* @param context The context as created by dc_context_new(). * @param context The context as created by dc_context_new().
* @return 1=success, 0=error * @return 1=success, 0=error
*/ */
int dc_chat_set_mute_duration (dc_context_t* context, uint32_t chat_id, int64_t duration); int dc_set_chat_mute_duration (dc_context_t* context, uint32_t chat_id, int64_t duration);
// handle messages // handle messages

View File

@@ -1412,13 +1412,13 @@ pub unsafe extern "C" fn dc_set_chat_profile_image(
} }
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn dc_chat_set_mute_duration( pub unsafe extern "C" fn dc_set_chat_mute_duration(
context: *mut dc_context_t, context: *mut dc_context_t,
chat_id: u32, chat_id: u32,
duration: i64, duration: i64,
) -> libc::c_int { ) -> libc::c_int {
if context.is_null() || chat_id <= constants::DC_CHAT_ID_LAST_SPECIAL as u32 { if context.is_null() || chat_id <= constants::DC_CHAT_ID_LAST_SPECIAL as u32 {
eprintln!("ignoring careless call to dc_chat_set_mute_duration()"); eprintln!("ignoring careless call to dc_set_chat_mute_duration()");
return 0; return 0;
} }

View File

@@ -108,14 +108,14 @@ class Chat(object):
mute_duration = -1 mute_duration = -1
else: else:
mute_duration = duration mute_duration = duration
return bool(lib.dc_chat_set_mute_duration(self._dc_context, self.id, mute_duration)) return bool(lib.dc_set_chat_mute_duration(self._dc_context, self.id, mute_duration))
def unmute(self): def unmute(self):
""" unmutes the chat """ unmutes the chat
:returns: :returns:
""" """
return bool(lib.dc_chat_set_mute_duration(self._dc_context, self.id, 0)) return bool(lib.dc_set_chat_mute_duration(self._dc_context, self.id, 0))
def get_mute_duration(self): def get_mute_duration(self):
""" Returns the number of seconds until the mute of this chat is lifted. """ Returns the number of seconds until the mute of this chat is lifted.