Skip to content

Commit

Permalink
Merge pull request #50747 from FitseTLT/fix-group-chat-name-graying-o…
Browse files Browse the repository at this point in the history
…ut-on-creation
  • Loading branch information
mountiny authored Oct 15, 2024
2 parents 5730f46 + c7847b9 commit ec3e940
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 @@ -824,8 +824,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 @@ -857,6 +857,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 @@ -910,6 +911,7 @@ function openReport(
participants: redundantParticipants,
pendingFields: {
createChat: null,
reportName: null,
},
errorFields: {
createChat: null,
Expand Down

0 comments on commit ec3e940

Please sign in to comment.