Skip to content

Commit

Permalink
Merge pull request #30273 from akinwale/task-28048-3
Browse files Browse the repository at this point in the history
[CP Staging] fix: add chatType field to optionItem for identifying group chat reports
  • Loading branch information
mountiny authored Oct 24, 2023
2 parents 485a851 + 4fade6d commit b72dfd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/SidebarUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ function getOptionData(report, reportActions, personalDetails, preferredLocale,
isExpenseRequest: false,
isWaitingOnBankAccount: false,
isAllowedToComment: true,
chatType: null,
};

const participantPersonalDetailList = _.values(OptionsListUtils.getPersonalDetailsForAccountIDs(report.participantAccountIDs, personalDetails));
Expand Down Expand Up @@ -305,6 +306,7 @@ function getOptionData(report, reportActions, personalDetails, preferredLocale,
result.isWaitingOnBankAccount = report.isWaitingOnBankAccount;
result.notificationPreference = report.notificationPreference || null;
result.isAllowedToComment = !ReportUtils.shouldDisableWriteActions(report);
result.chatType = report.chatType;

const hasMultipleParticipants = participantPersonalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat;
const subtitle = ReportUtils.getChatRoomSubtitle(report);
Expand Down

0 comments on commit b72dfd4

Please sign in to comment.