Skip to content

Commit 42ee04c

Browse files
authored
Merge pull request #38887 from abzokhattab/enable-searching-for-workspaces-by-participants
Enable searching for workspaces/rooms by their participants
2 parents 3ff3626 + 3bc93b8 commit 42ee04c

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/libs/OptionsListUtils.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -443,20 +443,19 @@ function getSearchText(
443443
): string {
444444
let searchTerms: string[] = [];
445445

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+
]);
458456
}
459457
}
458+
460459
if (report) {
461460
Array.prototype.push.apply(searchTerms, reportName.split(/[,\s]/));
462461

0 commit comments

Comments
 (0)