Skip to content

Commit

Permalink
Merge pull request #35142 from narefyev91/fix-hidden-name-in-search
Browse files Browse the repository at this point in the history
Fix hidden name is search
  • Loading branch information
robertjchen authored Jan 25, 2024
2 parents ac94dc5 + 666ff99 commit 071046f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ function getDisplayNameForParticipant(accountID?: number, shouldUseShortForm = f
// This is to check if account is an invite/optimistically created one
// and prevent from falling back to 'Hidden', so a correct value is shown
// when searching for a new user
if (personalDetails.isOptimisticPersonalDetail === true && formattedLogin) {
if (personalDetails.isOptimisticPersonalDetail === true) {
return formattedLogin;
}

Expand Down Expand Up @@ -2334,7 +2334,13 @@ function getAdminRoomInvitedParticipants(parentReportAction: ReportAction | Reco
const originalMessage = isChangeLogObject(parentReportAction.originalMessage);
const participantAccountIDs = originalMessage?.targetAccountIDs ?? [];

const participants = participantAccountIDs.map((id) => getDisplayNameForParticipant(id));
const participants = participantAccountIDs.map((id) => {
const name = getDisplayNameForParticipant(id);
if (name && name?.length > 0) {
return name;
}
return Localize.translateLocal('common.hidden');
});
const users = participants.length > 1 ? participants.join(` ${Localize.translateLocal('common.and')} `) : participants[0];
if (!users) {
return parentReportActionMessage;
Expand Down

0 comments on commit 071046f

Please sign in to comment.