diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index c2a82fce32fa..b7b450e1cc53 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -4334,6 +4334,10 @@ function getReportName( } function getSearchReportName(props: GetReportNameParams): string { + const {report, policy} = props; + if (isChatThread(report) && policy?.name) { + return policy.name; + } return getReportNameInternal(props); } diff --git a/src/types/onyx/SearchResults.ts b/src/types/onyx/SearchResults.ts index 9ed05c2ee930..d0be7ddd1651 100644 --- a/src/types/onyx/SearchResults.ts +++ b/src/types/onyx/SearchResults.ts @@ -170,6 +170,9 @@ type SearchReport = { /** Whether the report has a child that is an outstanding expense that is awaiting action from the current user */ hasOutstandingChildRequest?: boolean; + + /** Whether the user is not an admin of policyExpenseChat chat */ + isOwnPolicyExpenseChat?: boolean; }; /** Model of report action search result */