mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 12:56:30 +03:00
Return bool from dc_msg_get_showpadlock
This commit is contained in:
@@ -2085,7 +2085,7 @@ pub unsafe extern "C" fn dc_msg_get_showpadlock(msg: *mut dc_msg_t) -> libc::c_i
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
let ffi_msg = &*msg;
|
let ffi_msg = &*msg;
|
||||||
message::dc_msg_get_showpadlock(&ffi_msg.message)
|
message::dc_msg_get_showpadlock(&ffi_msg.message) as libc::c_int
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ unsafe fn log_msg(context: &Context, prefix: impl AsRef<str>, msg: &Message) {
|
|||||||
"{}#{}{}{}: {} (Contact#{}): {} {}{}{}{} [{}]",
|
"{}#{}{}{}: {} (Contact#{}): {} {}{}{}{} [{}]",
|
||||||
prefix.as_ref(),
|
prefix.as_ref(),
|
||||||
dc_msg_get_id(msg) as libc::c_int,
|
dc_msg_get_id(msg) as libc::c_int,
|
||||||
if 0 != dc_msg_get_showpadlock(msg) {
|
if dc_msg_get_showpadlock(msg) {
|
||||||
"🔒"
|
"🔒"
|
||||||
} else {
|
} else {
|
||||||
""
|
""
|
||||||
|
|||||||
@@ -699,13 +699,8 @@ pub fn dc_msg_get_duration(msg: &Message) -> libc::c_int {
|
|||||||
msg.param.get_int(Param::Duration).unwrap_or_default()
|
msg.param.get_int(Param::Duration).unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO should return bool /rtn
|
pub fn dc_msg_get_showpadlock(msg: &Message) -> bool {
|
||||||
pub fn dc_msg_get_showpadlock(msg: &Message) -> libc::c_int {
|
msg.param.get_int(Param::GuranteeE2ee).unwrap_or_default() != 0
|
||||||
if msg.param.get_int(Param::GuranteeE2ee).unwrap_or_default() != 0 {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn dc_msg_get_summary(context: &Context, msg: &mut Message, chat: Option<&Chat>) -> Lot {
|
pub fn dc_msg_get_summary(context: &Context, msg: &mut Message, chat: Option<&Chat>) -> Lot {
|
||||||
|
|||||||
Reference in New Issue
Block a user