Skip to content

Commit c7847b9

Browse files
committed
set add pendingField for reportName
1 parent 8ff185a commit c7847b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libs/actions/Report.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,8 @@ function openReport(
837837
accountIDList: participantAccountIDList ? participantAccountIDList.join(',') : '',
838838
parentReportActionID,
839839
};
840-
841-
if (ReportUtils.isGroupChat(newReportObject)) {
840+
const isGroupChat = ReportUtils.isGroupChat(newReportObject);
841+
if (isGroupChat) {
842842
parameters.chatType = CONST.REPORT.CHAT_TYPE.GROUP;
843843
parameters.groupChatAdminLogins = currentUserEmail;
844844
parameters.optimisticAccountIDList = Object.keys(newReportObject?.participants ?? {}).join(',');
@@ -870,6 +870,7 @@ function openReport(
870870
...newReportObject,
871871
pendingFields: {
872872
createChat: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
873+
...(isGroupChat && {reportName: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD}),
873874
},
874875
isOptimisticReport: true,
875876
};
@@ -923,6 +924,7 @@ function openReport(
923924
participants: redundantParticipants,
924925
pendingFields: {
925926
createChat: null,
927+
reportName: null,
926928
},
927929
errorFields: {
928930
createChat: null,

0 commit comments

Comments
 (0)