Skip to content

Commit

Permalink
Merge pull request #9758 from Expensify/Rory-StandardizeChatRoomName
Browse files Browse the repository at this point in the history
Standardize on auth providing # prefix in chat rooms
  • Loading branch information
aldo-expensify authored Jul 18, 2022
2 parents 93d7768 + 035ecc7 commit 13d2766
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,7 @@ function getDisplayNamesWithTooltips(participants, isMultipleParticipantReport)
*/
function getReportName(report, personalDetailsForParticipants = {}, policies = {}) {
let formattedName;
if (isDefaultRoom(report)) {
formattedName = `#${report.reportName}`;
}

if (isUserCreatedPolicyRoom(report)) {
if (isChatRoom(report)) {
formattedName = report.reportName;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/OptionsListUtilsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ describe('OptionsListUtils', () => {
participants: ['test3@instantworkspace.com'],
policyID: 'ABC123',
reportID: 12,
reportName: 'admins',
reportName: '#admins',
unreadActionCount: 0,
visibility: undefined,
},
Expand All @@ -822,7 +822,7 @@ describe('OptionsListUtils', () => {
participants: ['test3@instantworkspace.com'],
policyID: 'ABC123',
reportID: 13,
reportName: 'admins',
reportName: '#admins',
unreadActionCount: 0,
visibility: undefined,
stateNum: CONST.REPORT.STATE_NUM.SUBMITTED,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/ReportUtilsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('ReportUtils', () => {
describe('Default Policy Room', () => {
const baseAdminsRoom = {
chatType: CONST.REPORT.CHAT_TYPE.POLICY_ADMINS,
reportName: 'admins',
reportName: '#admins',
};

test('Active', () => {
Expand Down

0 comments on commit 13d2766

Please sign in to comment.