Skip to content
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
4 changes: 2 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3194,7 +3194,7 @@ function getReportName(report: OnyxEntry<Report>, policy: OnyxEntry<Policy> = nu
if (isArchivedRoom(report)) {
formattedName += ` (${Localize.translateLocal('common.archived')})`;
}
return formattedName;
return formatReportLastMessageText(formattedName);
}

if (parentReportAction?.message?.[0]?.isDeletedParentAction) {
Expand Down Expand Up @@ -3266,7 +3266,7 @@ function getReportName(report: OnyxEntry<Report>, policy: OnyxEntry<Policy> = nu
}

if (formattedName) {
return formattedName;
return formatReportLastMessageText(formattedName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not sure if it is necessary or not, could you explain why we need to update this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@DylanDylann The update here is to prevent similar bugs in the future if the formattedName variable ever contains a line break.

}

// Not a room or PolicyExpenseChat, generate title from first 5 other participants
Expand Down