mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
fix: do not try to lookup key-contacts for unencrypted 1:1 messages
This commit is contained in:
@@ -394,13 +394,31 @@ async fn get_to_and_past_contact_ids(
|
|||||||
// This is an encrypted 1:1 chat.
|
// This is an encrypted 1:1 chat.
|
||||||
to_ids = pgp_to_ids
|
to_ids = pgp_to_ids
|
||||||
} else if let Some(chat_id) = chat_id {
|
} else if let Some(chat_id) = chat_id {
|
||||||
to_ids = lookup_key_contacts_by_address_list(
|
to_ids = match mime_parser.was_encrypted() {
|
||||||
context,
|
true => {
|
||||||
&mime_parser.recipients,
|
lookup_key_contacts_by_address_list(
|
||||||
to_member_fingerprints,
|
context,
|
||||||
Some(chat_id),
|
&mime_parser.recipients,
|
||||||
)
|
to_member_fingerprints,
|
||||||
.await?;
|
Some(chat_id),
|
||||||
|
)
|
||||||
|
.await?
|
||||||
|
}
|
||||||
|
false => {
|
||||||
|
add_or_lookup_contacts_by_address_list(
|
||||||
|
context,
|
||||||
|
&mime_parser.recipients,
|
||||||
|
if !mime_parser.incoming {
|
||||||
|
Origin::OutgoingTo
|
||||||
|
} else if incoming_origin.is_known() {
|
||||||
|
Origin::IncomingTo
|
||||||
|
} else {
|
||||||
|
Origin::IncomingUnknownTo
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.await?
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let ids = match mime_parser.was_encrypted() {
|
let ids = match mime_parser.was_encrypted() {
|
||||||
true => {
|
true => {
|
||||||
|
|||||||
Reference in New Issue
Block a user