Skip to content

Commit

Permalink
add chatType field to optionItem for identifying group chat reports
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed Oct 24, 2023
1 parent cc3c51c commit 4fade6d
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 4fade6d

Please sign in to comment.