Skip to content

Commit

Permalink
Merge pull request #35335 from Expensify/revert-33928-fix/30190
Browse files Browse the repository at this point in the history
(cherry picked from commit 0b223a0)
  • Loading branch information
francoisl authored and OSBotify committed Jan 29, 2024
1 parent 3b755ca commit 951b599
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ function getOptions(
if (includePersonalDetails) {
// Next loop over all personal details removing any that are selectedUsers or recentChats
allPersonalDetailsOptions.forEach((personalDetailOption) => {
if (optionsToExclude.some((optionToExclude) => optionToExclude.login === addSMSDomainIfPhoneNumber(personalDetailOption.login ?? ''))) {
if (optionsToExclude.some((optionToExclude) => optionToExclude.login === personalDetailOption.login)) {
return;
}
const {searchText, participantsList, isChatRoom} = personalDetailOption;
Expand Down
5 changes: 1 addition & 4 deletions src/pages/RoomInvitePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ function RoomInvitePage(props) {

// Any existing participants and Expensify emails should not be eligible for invitation
const excludedUsers = useMemo(
() =>
_.map([...PersonalDetailsUtils.getLoginsByAccountIDs(lodashGet(props.report, 'visibleChatMemberAccountIDs', [])), ...CONST.EXPENSIFY_EMAILS], (participant) =>
OptionsListUtils.addSMSDomainIfPhoneNumber(participant),
),
() => [...PersonalDetailsUtils.getLoginsByAccountIDs(lodashGet(props.report, 'visibleChatMemberAccountIDs', [])), ...CONST.EXPENSIFY_EMAILS],
[props.report],
);

Expand Down

0 comments on commit 951b599

Please sign in to comment.