mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 09:56:31 +03:00
remove reverse "check_self" return
This commit is contained in:
@@ -527,7 +527,7 @@ impl<'a> MimeParser<'a> {
|
||||
let filename = get_attachment_filename(mail);
|
||||
info!(
|
||||
self.context,
|
||||
"add_single_part_if_known {:?} {:?} {:?}", mime_type, msg_type, filename
|
||||
"add_single_part_if_known {:?} {:?}", mime_type, msg_type
|
||||
);
|
||||
|
||||
let old_part_count = self.parts.len();
|
||||
@@ -665,25 +665,6 @@ impl<'a> MimeParser<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn sender_equals_recipient(&self) -> bool {
|
||||
/* get From: and check there is exactly one sender */
|
||||
if let Some(field) = self.get(HeaderDef::From_) {
|
||||
if let Ok(addrs) = mailparse::addrparse(field) {
|
||||
if addrs.len() != 1 {
|
||||
return false;
|
||||
}
|
||||
if let mailparse::MailAddr::Single(ref info) = addrs[0] {
|
||||
let from_addr_norm = addr_normalize(&info.addr);
|
||||
let recipients = get_recipients(self.header.iter());
|
||||
if recipients.len() == 1 && recipients.contains(from_addr_norm) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
pub fn repl_msg_by_error(&mut self, error_msg: impl AsRef<str>) {
|
||||
if self.parts.is_empty() {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user