Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hidden name is search #35142

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,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 @@ -2341,7 +2341,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) {
narefyev91 marked this conversation as resolved.
Show resolved Hide resolved
return name;
}
return Localize.translateLocal('common.hidden');
narefyev91 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm that this change shouldn't be treated as regression (in case reported as new bug)
Originally empty string. Now looks better to show as "Hidden"

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