mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 14:26:30 +03:00
Use DC_PARAM_* constants everywhere
Also document each type they store. This makes existing code a little more readable and gives some hints towards refactoring this.
This commit is contained in:
@@ -76,7 +76,7 @@ pub unsafe fn dc_send_locations_to_chat(
|
||||
0 as *const libc::c_char,
|
||||
0,
|
||||
);
|
||||
dc_param_set_int((*msg).param, 'S' as i32, 8i32);
|
||||
dc_param_set_int((*msg).param, DC_PARAM_CMD as i32, 8);
|
||||
dc_send_msg(context, chat_id, msg);
|
||||
} else if 0 == seconds && is_sending_locations_before {
|
||||
stock_str = dc_stock_system_msg(
|
||||
@@ -688,7 +688,7 @@ pub unsafe fn dc_job_do_DC_JOB_MAYBE_SEND_LOCATIONS(context: &Context, _job: *mu
|
||||
// and dc_set_location() is typically called periodically, this is ok)
|
||||
let mut msg = dc_msg_new(context, 10);
|
||||
(*msg).hidden = 1;
|
||||
dc_param_set_int((*msg).param, 'S' as i32, 9);
|
||||
dc_param_set_int((*msg).param, DC_PARAM_CMD as i32, 9);
|
||||
dc_send_msg(context, chat_id as u32, msg);
|
||||
dc_msg_unref(msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user