From cdd844bff455fc1585ed21ebad29fbe08ab1cdac Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 28 Jul 2023 20:13:16 +0200 Subject: [PATCH] pass writeCapability explicitly --- src/libs/ReportUtils.js | 2 +- src/libs/actions/Report.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index d5f9e1586a82..56466b254c53 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1878,7 +1878,7 @@ function buildOptimisticChatReport( isOwnPolicyExpenseChat = false, oldPolicyName = '', visibility = undefined, - writeCapability = CONST.REPORT.WRITE_CAPABILITIES.ALL, + writeCapability = undefined, notificationPreference = CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, parentReportActionID = '', parentReportID = '', diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 988d709b088c..38e3676492d4 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1271,7 +1271,7 @@ function navigateToConciergeChat() { * @param {Array} policyMembersAccountIDs * @param {String} writeCapability */ -function addPolicyReport(policyID, reportName, visibility, policyMembersAccountIDs, writeCapability) { +function addPolicyReport(policyID, reportName, visibility, policyMembersAccountIDs, writeCapability = CONST.REPORT.WRITE_CAPABILITIES.ALL) { // The participants include the current user (admin), and for restricted rooms, the policy members. Participants must not be empty. const members = visibility === CONST.REPORT.VISIBILITY.RESTRICTED ? policyMembersAccountIDs : []; const participants = _.unique([currentUserAccountID, ...members]);