mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
Tweak error halding a little
- Python should raise exceptions on error. Not return False. - Negative durations are nonense. - ChatID validity is already checked by the Rust API, let's not duplicate.
This commit is contained in:
@@ -1415,7 +1415,7 @@ pub unsafe extern "C" fn dc_set_chat_mute_duration(
|
||||
chat_id: u32,
|
||||
duration: i64,
|
||||
) -> libc::c_int {
|
||||
if context.is_null() || chat_id <= constants::DC_CHAT_ID_LAST_SPECIAL as u32 {
|
||||
if context.is_null() {
|
||||
eprintln!("ignoring careless call to dc_set_chat_mute_duration()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user