Bootstrapping implementation
This commit is contained in:
@@ -345,10 +345,11 @@ impl EncryptMessage for Message<'_> {
|
||||
}
|
||||
|
||||
match text_part {
|
||||
Some(text) if self.parts.len() == 1 || is_multipart => {
|
||||
if text.trim_start().starts_with("-----BEGIN PGP MESSAGE-----") {
|
||||
return true;
|
||||
}
|
||||
Some(text)
|
||||
if (self.parts.len() == 1 || is_multipart)
|
||||
&& text.trim_start().starts_with("-----BEGIN PGP MESSAGE-----") =>
|
||||
{
|
||||
return true;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
@@ -785,12 +785,11 @@ impl EmailIngest for Server {
|
||||
let document_id = key.deserialize_be_u32(document_id_pos)?;
|
||||
let thread_id = value.deserialize_be_u32(0)?;
|
||||
|
||||
if message_ids.len() == 1
|
||||
|| (message_ids.len() == references.len() / CheekyHash::HASH_SIZE
|
||||
&& references
|
||||
.chunks_exact(CheekyHash::HASH_SIZE)
|
||||
.zip(message_ids.iter())
|
||||
.all(|(a, b)| a == b.as_raw_bytes()))
|
||||
if message_ids.len() == references.len() / CheekyHash::HASH_SIZE
|
||||
&& references
|
||||
.chunks_exact(CheekyHash::HASH_SIZE)
|
||||
.zip(message_ids.iter())
|
||||
.all(|(a, b)| a == b.as_raw_bytes())
|
||||
{
|
||||
result.duplicate_ids.push(document_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user