diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index a7ead4e100fa..16df11a04922 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -4605,7 +4605,13 @@ function buildOptimisticChatReport( return optimisticChatReport; } -function buildOptimisticGroupChatReport(participantAccountIDs: number[], reportName: string, avatarUri: string, optimisticReportID?: string) { +function buildOptimisticGroupChatReport( + participantAccountIDs: number[], + reportName: string, + avatarUri: string, + optimisticReportID?: string, + notificationPreference?: NotificationPreference, +) { return buildOptimisticChatReport( participantAccountIDs, reportName, @@ -4616,7 +4622,7 @@ function buildOptimisticGroupChatReport(participantAccountIDs: number[], reportN undefined, undefined, undefined, - undefined, + notificationPreference, undefined, undefined, undefined, diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index ec2f9119551e..cfe2aa003a42 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -974,9 +974,20 @@ function navigateToAndOpenReport( if (isEmptyObject(chat)) { if (isGroupChat) { // If we are creating a group chat then participantAccountIDs is expected to contain currentUserAccountID - newChat = ReportUtils.buildOptimisticGroupChatReport(participantAccountIDs, reportName ?? '', avatarUri ?? '', optimisticReportID); + newChat = ReportUtils.buildOptimisticGroupChatReport(participantAccountIDs, reportName ?? '', avatarUri ?? '', optimisticReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN); } else { - newChat = ReportUtils.buildOptimisticChatReport([...participantAccountIDs, currentUserAccountID]); + newChat = ReportUtils.buildOptimisticChatReport( + [...participantAccountIDs, currentUserAccountID], + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, + ); } } const report = isEmptyObject(chat) ? newChat : chat;