mirror of
https://github.com/chatmail/core.git
synced 2026-05-13 03:46:32 +03:00
run cargo fmt
This commit is contained in:
@@ -199,8 +199,7 @@ pub unsafe fn dc_receive_imf(
|
|||||||
ok_to_continue = false;
|
ok_to_continue = false;
|
||||||
} else {
|
} else {
|
||||||
msgrmsg = mime_parser.is_send_by_messenger;
|
msgrmsg = mime_parser.is_send_by_messenger;
|
||||||
if msgrmsg == 0
|
if msgrmsg == 0 && 0 != dc_is_reply_to_messenger_message(context, &mime_parser)
|
||||||
&& 0 != dc_is_reply_to_messenger_message(context, &mime_parser)
|
|
||||||
{
|
{
|
||||||
msgrmsg = 2
|
msgrmsg = 2
|
||||||
}
|
}
|
||||||
@@ -301,9 +300,7 @@ pub unsafe fn dc_receive_imf(
|
|||||||
if 0 == create_blocked_0 {
|
if 0 == create_blocked_0 {
|
||||||
dc_unblock_chat(context, chat_id);
|
dc_unblock_chat(context, chat_id);
|
||||||
chat_id_blocked = 0
|
chat_id_blocked = 0
|
||||||
} else if 0
|
} else if 0 != dc_is_reply_to_known_message(context, &mime_parser) {
|
||||||
!= dc_is_reply_to_known_message(context, &mime_parser)
|
|
||||||
{
|
|
||||||
dc_scaleup_contact_origin(context, from_id, 0x100);
|
dc_scaleup_contact_origin(context, from_id, 0x100);
|
||||||
info!(
|
info!(
|
||||||
context,
|
context,
|
||||||
@@ -361,8 +358,7 @@ pub unsafe fn dc_receive_imf(
|
|||||||
&mut chat_id,
|
&mut chat_id,
|
||||||
&mut chat_id_blocked,
|
&mut chat_id_blocked,
|
||||||
);
|
);
|
||||||
if 0 != chat_id && 0 != chat_id_blocked && 0 == create_blocked_1
|
if 0 != chat_id && 0 != chat_id_blocked && 0 == create_blocked_1 {
|
||||||
{
|
|
||||||
dc_unblock_chat(context, chat_id);
|
dc_unblock_chat(context, chat_id);
|
||||||
chat_id_blocked = 0
|
chat_id_blocked = 0
|
||||||
}
|
}
|
||||||
@@ -543,10 +539,7 @@ pub unsafe fn dc_receive_imf(
|
|||||||
if ok_to_continue {
|
if ok_to_continue {
|
||||||
info!(
|
info!(
|
||||||
context,
|
context,
|
||||||
0,
|
0, "Message has {} parts and is assigned to chat #{}.", icnt, chat_id,
|
||||||
"Message has {} parts and is assigned to chat #{}.",
|
|
||||||
icnt,
|
|
||||||
chat_id,
|
|
||||||
);
|
);
|
||||||
if chat_id == 3 as libc::c_uint {
|
if chat_id == 3 as libc::c_uint {
|
||||||
create_event_to_send = None;
|
create_event_to_send = None;
|
||||||
@@ -559,11 +552,7 @@ pub unsafe fn dc_receive_imf(
|
|||||||
create_event_to_send = Some(Event::INCOMING_MSG);
|
create_event_to_send = Some(Event::INCOMING_MSG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dc_do_heuristics_moves(
|
dc_do_heuristics_moves(context, server_folder.as_ref(), insert_msg_id);
|
||||||
context,
|
|
||||||
server_folder.as_ref(),
|
|
||||||
insert_msg_id,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -601,8 +590,7 @@ pub unsafe fn dc_receive_imf(
|
|||||||
.first
|
.first
|
||||||
.is_null()
|
.is_null()
|
||||||
{
|
{
|
||||||
(*(*(*report_root).mm_data.mm_multipart.mm_mp_list)
|
(*(*(*report_root).mm_data.mm_multipart.mm_mp_list).first)
|
||||||
.first)
|
|
||||||
.next
|
.next
|
||||||
} else {
|
} else {
|
||||||
0 as *mut clistcell
|
0 as *mut clistcell
|
||||||
@@ -648,8 +636,7 @@ pub unsafe fn dc_receive_imf(
|
|||||||
&mut report_body_bytes,
|
&mut report_body_bytes,
|
||||||
&mut to_mmap_string_unref,
|
&mut to_mmap_string_unref,
|
||||||
) {
|
) {
|
||||||
let mut report_parsed: *mut mailmime =
|
let mut report_parsed: *mut mailmime = 0 as *mut mailmime;
|
||||||
0 as *mut mailmime;
|
|
||||||
let mut dummy: size_t = 0 as size_t;
|
let mut dummy: size_t = 0 as size_t;
|
||||||
if mailmime_parse(
|
if mailmime_parse(
|
||||||
report_body,
|
report_body,
|
||||||
@@ -662,14 +649,12 @@ pub unsafe fn dc_receive_imf(
|
|||||||
let report_fields: *mut mailimf_fields =
|
let report_fields: *mut mailimf_fields =
|
||||||
mailmime_find_mailimf_fields(report_parsed);
|
mailmime_find_mailimf_fields(report_parsed);
|
||||||
if !report_fields.is_null() {
|
if !report_fields.is_null() {
|
||||||
let of_disposition:
|
let of_disposition: *mut mailimf_optional_field =
|
||||||
*mut mailimf_optional_field =
|
mailimf_find_optional_field(
|
||||||
mailimf_find_optional_field(report_fields,
|
report_fields,
|
||||||
b"Disposition\x00"
|
b"Disposition\x00" as *const u8
|
||||||
as
|
as *const libc::c_char,
|
||||||
*const u8
|
);
|
||||||
as
|
|
||||||
*const libc::c_char);
|
|
||||||
let of_org_msgid: *mut mailimf_optional_field =
|
let of_org_msgid: *mut mailimf_optional_field =
|
||||||
mailimf_find_optional_field(
|
mailimf_find_optional_field(
|
||||||
report_fields,
|
report_fields,
|
||||||
@@ -692,10 +677,8 @@ pub unsafe fn dc_receive_imf(
|
|||||||
) == MAIL_NO_ERROR as libc::c_int
|
) == MAIL_NO_ERROR as libc::c_int
|
||||||
&& !rfc724_mid_0.is_null()
|
&& !rfc724_mid_0.is_null()
|
||||||
{
|
{
|
||||||
let mut chat_id_0: uint32_t =
|
let mut chat_id_0: uint32_t = 0 as uint32_t;
|
||||||
0 as uint32_t;
|
let mut msg_id: uint32_t = 0 as uint32_t;
|
||||||
let mut msg_id: uint32_t =
|
|
||||||
0 as uint32_t;
|
|
||||||
if 0 != dc_mdn_from_ext(
|
if 0 != dc_mdn_from_ext(
|
||||||
context,
|
context,
|
||||||
from_id,
|
from_id,
|
||||||
@@ -704,12 +687,10 @@ pub unsafe fn dc_receive_imf(
|
|||||||
&mut chat_id_0,
|
&mut chat_id_0,
|
||||||
&mut msg_id,
|
&mut msg_id,
|
||||||
) {
|
) {
|
||||||
rr_event_to_send
|
rr_event_to_send.push((chat_id_0, 0));
|
||||||
.push((chat_id_0, 0));
|
|
||||||
rr_event_to_send.push((msg_id, 0));
|
rr_event_to_send.push((msg_id, 0));
|
||||||
}
|
}
|
||||||
mdn_consumed = (msg_id
|
mdn_consumed = (msg_id != 0 as libc::c_uint)
|
||||||
!= 0 as libc::c_uint)
|
|
||||||
as libc::c_int;
|
as libc::c_int;
|
||||||
free(rfc724_mid_0 as *mut libc::c_void);
|
free(rfc724_mid_0 as *mut libc::c_void);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user