File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -2961,15 +2961,12 @@ pub(crate) async fn get_prefetch_parent_message(
2961
2961
}
2962
2962
2963
2963
/// Looks up contact IDs from the database given the list of recipients.
2964
- ///
2965
- /// Returns vector of IDs guaranteed to be unique.
2966
2964
async fn add_or_lookup_contacts_by_address_list (
2967
2965
context : & Context ,
2968
2966
address_list : & [ SingleInfo ] ,
2969
2967
origin : Origin ,
2970
2968
) -> Result < Vec < ContactId > > {
2971
2969
let mut contact_ids = Vec :: new ( ) ;
2972
- let mut contact_ids_set = HashSet :: new ( ) ;
2973
2970
for info in address_list {
2974
2971
let addr = & info. addr ;
2975
2972
if !may_be_valid_addr ( addr) {
@@ -2980,10 +2977,7 @@ async fn add_or_lookup_contacts_by_address_list(
2980
2977
let ( contact_id, _) =
2981
2978
Contact :: add_or_lookup ( context, display_name. unwrap_or_default ( ) , & addr, origin)
2982
2979
. await ?;
2983
- if !contact_ids_set. contains ( & contact_id) {
2984
- contact_ids. push ( contact_id) ;
2985
- contact_ids_set. insert ( contact_id) ;
2986
- }
2980
+ contact_ids. push ( contact_id) ;
2987
2981
} else {
2988
2982
warn ! ( context, "Contact with address {:?} cannot exist." , addr) ;
2989
2983
}
You can’t perform that action at this time.
0 commit comments