Skip to content

Commit

Permalink
set add pendingField for reportName
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Oct 14, 2024
1 parent 8ff185a commit c7847b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,8 @@ function openReport(
accountIDList: participantAccountIDList ? participantAccountIDList.join(',') : '',
parentReportActionID,
};

if (ReportUtils.isGroupChat(newReportObject)) {
const isGroupChat = ReportUtils.isGroupChat(newReportObject);
if (isGroupChat) {
parameters.chatType = CONST.REPORT.CHAT_TYPE.GROUP;
parameters.groupChatAdminLogins = currentUserEmail;
parameters.optimisticAccountIDList = Object.keys(newReportObject?.participants ?? {}).join(',');
Expand Down Expand Up @@ -870,6 +870,7 @@ function openReport(
...newReportObject,
pendingFields: {
createChat: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
...(isGroupChat && {reportName: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD}),
},
isOptimisticReport: true,
};
Expand Down Expand Up @@ -923,6 +924,7 @@ function openReport(
participants: redundantParticipants,
pendingFields: {
createChat: null,
reportName: null,
},
errorFields: {
createChat: null,
Expand Down

0 comments on commit c7847b9

Please sign in to comment.