Skip to content

Commit

Permalink
Add the workspace name to the title of the workspace chats
Browse files Browse the repository at this point in the history
  • Loading branch information
nyomanjyotisa committed Sep 30, 2024
1 parent 3634670 commit 868b700
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
}

if (isChatRoom) {
return translate('reportActionsView.welcomeToRoom', {roomName: reportName});
return translate('reportActionsView.welcomeToRoom', {roomName: report?.reportName ?? ''});
}

if (isSelfDM) {
Expand Down
4 changes: 4 additions & 0 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3879,6 +3879,10 @@ function getReportName(
formattedName += ` (${Localize.translateLocal('common.archived')})`;
}

if (isUserCreatedPolicyRoom(report) || isDefaultRoom(report)) {
formattedName = report?.policyName + ' • ' + report?.reportName;

Check failure on line 3883 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unsafe arithmetic operation on optional chaining. It can result in NaN

Check failure on line 3883 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unexpected string concatenation

Check failure on line 3883 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unsafe arithmetic operation on optional chaining. It can result in NaN

Check failure on line 3883 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Unsafe arithmetic operation on optional chaining. It can result in NaN

Check failure on line 3883 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Unexpected string concatenation

Check failure on line 3883 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Unsafe arithmetic operation on optional chaining. It can result in NaN
}

if (isSelfDM(report)) {
formattedName = getDisplayNameForParticipant(currentUserAccountID, undefined, undefined, true, personalDetails);
}
Expand Down

0 comments on commit 868b700

Please sign in to comment.