@@ -443,20 +443,19 @@ function getSearchText(
443
443
) : string {
444
444
let searchTerms : string [ ] = [ ] ;
445
445
446
- if ( ! isChatRoomOrPolicyExpenseChat ) {
447
- for ( const personalDetail of personalDetailList ) {
448
- if ( personalDetail . login ) {
449
- // The regex below is used to remove dots only from the local part of the user email (local-part@domain)
450
- // so that we can match emails that have dots without explicitly writing the dots (e.g: fistlast@domain will match first.last@domain)
451
- // More info https://github.com/Expensify/App/issues/8007
452
- searchTerms = searchTerms . concat ( [
453
- PersonalDetailsUtils . getDisplayNameOrDefault ( personalDetail , '' , false ) ,
454
- personalDetail . login ,
455
- personalDetail . login . replace ( / \. (? = [ ^ \s @ ] * @ ) / g, '' ) ,
456
- ] ) ;
457
- }
446
+ for ( const personalDetail of personalDetailList ) {
447
+ if ( personalDetail . login ) {
448
+ // The regex below is used to remove dots only from the local part of the user email (local-part@domain)
449
+ // so that we can match emails that have dots without explicitly writing the dots (e.g: fistlast@domain will match first.last@domain)
450
+ // More info https://github.com/Expensify/App/issues/8007
451
+ searchTerms = searchTerms . concat ( [
452
+ PersonalDetailsUtils . getDisplayNameOrDefault ( personalDetail , '' , false ) ,
453
+ personalDetail . login ,
454
+ personalDetail . login . replace ( / \. (? = [ ^ \s @ ] * @ ) / g, '' ) ,
455
+ ] ) ;
458
456
}
459
457
}
458
+
460
459
if ( report ) {
461
460
Array . prototype . push . apply ( searchTerms , reportName . split ( / [ , \s ] / ) ) ;
462
461
0 commit comments