From 78b7715ea6d6d0de702c57a58c78a6e37282116f Mon Sep 17 00:00:00 2001 From: iequidoo Date: Tue, 29 Jul 2025 17:13:05 -0300 Subject: [PATCH] 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`). --- src/receive_imf.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 840c4fa94..43d592a33 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -297,7 +297,7 @@ async fn get_to_and_past_contact_ids( 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, &mime_parser.recipients, &mime_parser.gossiped_keys, @@ -319,7 +319,7 @@ async fn get_to_and_past_contact_ids( ) .await?; } else { - past_ids = add_or_lookup_key_contacts_by_address_list( + past_ids = add_or_lookup_key_contacts( context, &mime_parser.past_members, &mime_parser.gossiped_keys, @@ -429,7 +429,7 @@ async fn get_to_and_past_contact_ids( context, &mime_parser.recipients, to_member_fingerprints, - chat_id, + None, ) .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. -async fn add_or_lookup_key_contacts_by_address_list( +async fn add_or_lookup_key_contacts( context: &Context, address_list: &[SingleInfo], gossiped_keys: &HashMap,