refactor: Rename lookup_key_contacts_by_address_list() to lookup_key_contacts_fallback_to_chat()

It only looks up contacts by address in the given chat, so `_fallback_to_chat` suffix is more
informative. It's obvious that such a lookup is done by address, there are no other reasonable
options.
This commit is contained in:
iequidoo
2026-01-27 05:18:07 -03:00
committed by iequidoo
parent 6c4f4bfd19
commit 2019debe99

View File

@@ -282,7 +282,7 @@ async fn get_to_and_past_contact_ids(
.await?;
if let Some(chat_id) = chat_id {
past_ids = lookup_key_contacts_by_address_list(
past_ids = lookup_key_contacts_fallback_to_chat(
context,
&mime_parser.past_members,
past_member_fingerprints,
@@ -315,7 +315,7 @@ async fn get_to_and_past_contact_ids(
Origin::Hidden,
)
.await?;
past_ids = lookup_key_contacts_by_address_list(
past_ids = lookup_key_contacts_fallback_to_chat(
context,
&mime_parser.past_members,
past_member_fingerprints,
@@ -388,7 +388,7 @@ async fn get_to_and_past_contact_ids(
} else {
let ids = match mime_parser.was_encrypted() {
true => {
lookup_key_contacts_by_address_list(
lookup_key_contacts_fallback_to_chat(
context,
&mime_parser.recipients,
to_member_fingerprints,
@@ -4185,7 +4185,7 @@ async fn lookup_key_contact_by_fingerprint(
}
}
/// Looks up key-contacts by email addresses.
/// Adds or looks up key-contacts by fingerprints or by email addresses in the given chat.
///
/// `fingerprints` may be empty.
/// This is used as a fallback when email addresses are available,
@@ -4200,7 +4200,7 @@ async fn lookup_key_contact_by_fingerprint(
/// is the same as the number of addresses in the header
/// and it is possible to find corresponding
/// `Chat-Group-Member-Timestamps` items.
async fn lookup_key_contacts_by_address_list(
async fn lookup_key_contacts_fallback_to_chat(
context: &Context,
address_list: &[SingleInfo],
fingerprints: &[Fingerprint],