Skip to content

Commit 20612da

Browse files
committed
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 (no only `SELF`).
1 parent d80b749 commit 20612da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/receive_imf.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ async fn get_to_and_past_contact_ids(
297297
past_member_fingerprints = &[];
298298
}
299299

300-
let pgp_to_ids = add_or_lookup_key_contacts_by_address_list(
300+
let pgp_to_ids = add_or_lookup_key_contacts(
301301
context,
302302
&mime_parser.recipients,
303303
&mime_parser.gossiped_keys,
@@ -319,7 +319,7 @@ async fn get_to_and_past_contact_ids(
319319
)
320320
.await?;
321321
} else {
322-
past_ids = add_or_lookup_key_contacts_by_address_list(
322+
past_ids = add_or_lookup_key_contacts(
323323
context,
324324
&mime_parser.past_members,
325325
&mime_parser.gossiped_keys,
@@ -429,7 +429,7 @@ async fn get_to_and_past_contact_ids(
429429
context,
430430
&mime_parser.recipients,
431431
to_member_fingerprints,
432-
chat_id,
432+
None,
433433
)
434434
.await?
435435
}
@@ -3727,7 +3727,7 @@ async fn add_or_lookup_contacts_by_address_list(
37273727
}
37283728

37293729
/// Looks up contact IDs from the database given the list of recipients.
3730-
async fn add_or_lookup_key_contacts_by_address_list(
3730+
async fn add_or_lookup_key_contacts(
37313731
context: &Context,
37323732
address_list: &[SingleInfo],
37333733
gossiped_keys: &HashMap<String, SignedPublicKey>,

0 commit comments

Comments
 (0)