refactor: Rename add_or_lookup_key_contacts_by_address_list() to add_or_lookup_key_contacts()

- It's obvious that addresses are needed to add contacts, so `_by_address_list` looks excessive.
- The function only looks up `SELF` by address.
- The name was confusing because there's also `lookup_key_contacts_by_address_list()` that actually
  looks up key contacts by addresses (not only `SELF`).
This commit is contained in:
iequidoo
2025-07-29 17:13:05 -03:00
committed by iequidoo
parent ba76944d75
commit 78b7715ea6

View File

@@ -297,7 +297,7 @@ async fn get_to_and_past_contact_ids(
past_member_fingerprints = &[]; past_member_fingerprints = &[];
} }
let pgp_to_ids = add_or_lookup_key_contacts_by_address_list( let pgp_to_ids = add_or_lookup_key_contacts(
context, context,
&mime_parser.recipients, &mime_parser.recipients,
&mime_parser.gossiped_keys, &mime_parser.gossiped_keys,
@@ -319,7 +319,7 @@ async fn get_to_and_past_contact_ids(
) )
.await?; .await?;
} else { } else {
past_ids = add_or_lookup_key_contacts_by_address_list( past_ids = add_or_lookup_key_contacts(
context, context,
&mime_parser.past_members, &mime_parser.past_members,
&mime_parser.gossiped_keys, &mime_parser.gossiped_keys,
@@ -429,7 +429,7 @@ async fn get_to_and_past_contact_ids(
context, context,
&mime_parser.recipients, &mime_parser.recipients,
to_member_fingerprints, to_member_fingerprints,
chat_id, None,
) )
.await? .await?
} }
@@ -3729,7 +3729,7 @@ async fn add_or_lookup_contacts_by_address_list(
} }
/// Looks up contact IDs from the database given the list of recipients. /// Looks up contact IDs from the database given the list of recipients.
async fn add_or_lookup_key_contacts_by_address_list( async fn add_or_lookup_key_contacts(
context: &Context, context: &Context,
address_list: &[SingleInfo], address_list: &[SingleInfo],
gossiped_keys: &HashMap<String, SignedPublicKey>, gossiped_keys: &HashMap<String, SignedPublicKey>,