@@ -109,6 +109,7 @@ import type {
109109import type { Errors } from '@src/types/onyx/OnyxCommon' ;
110110import type { Attributes , CompanyAddress , CustomUnit , NetSuiteCustomList , NetSuiteCustomSegment , ProhibitedExpenses , Rate , TaxRate } from '@src/types/onyx/Policy' ;
111111import type { CustomFieldType } from '@src/types/onyx/PolicyEmployee' ;
112+ import type { NotificationPreference } from '@src/types/onyx/Report' ;
112113import type { OnyxData } from '@src/types/onyx/Request' ;
113114import { isEmptyObject } from '@src/types/utils/EmptyObject' ;
114115import { buildOptimisticMccGroup , buildOptimisticPolicyCategories } from './Category' ;
@@ -1158,7 +1159,12 @@ function verifySetupIntentAndRequestPolicyOwnerChange(policyID: string) {
11581159 *
11591160 * @returns - object with onyxSuccessData, onyxOptimisticData, and optimisticReportIDs (map login to reportID)
11601161 */
1161- function createPolicyExpenseChats ( policyID : string , invitedEmailsToAccountIDs : InvitedEmailsToAccountIDs , hasOutstandingChildRequest = false ) : WorkspaceMembersChats {
1162+ function createPolicyExpenseChats (
1163+ policyID : string ,
1164+ invitedEmailsToAccountIDs : InvitedEmailsToAccountIDs ,
1165+ hasOutstandingChildRequest = false ,
1166+ notificationPreference : NotificationPreference = CONST . REPORT . NOTIFICATION_PREFERENCE . HIDDEN ,
1167+ ) : WorkspaceMembersChats {
11621168 const workspaceMembersChats : WorkspaceMembersChats = {
11631169 onyxSuccessData : [ ] ,
11641170 onyxOptimisticData : [ ] ,
@@ -1221,7 +1227,7 @@ function createPolicyExpenseChats(policyID: string, invitedEmailsToAccountIDs: I
12211227 chatType : CONST . REPORT . CHAT_TYPE . POLICY_EXPENSE_CHAT ,
12221228 policyID,
12231229 ownerAccountID : cleanAccountID ,
1224- notificationPreference : CONST . REPORT . NOTIFICATION_PREFERENCE . HIDDEN ,
1230+ notificationPreference,
12251231 } ) ;
12261232
12271233 // Set correct notification preferences: visible for the submitter, hidden for others until there's activity
0 commit comments