Skip to content

Commit

Permalink
Merge pull request #22385 from Expensify/francois-fixPublicRoomsOffli…
Browse files Browse the repository at this point in the history
…neMemberVisibility
  • Loading branch information
francoisl authored Jul 6, 2023
2 parents c088821 + 8a468b5 commit 4dd425f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -1200,8 +1200,9 @@ function navigateToConciergeChat() {
* @param {Array} policyMembers
*/
function addPolicyReport(policyID, reportName, visibility, policyMembers) {
// The participants include the current user (admin) and the employees. Participants must not be empty.
const participants = _.unique([currentUserAccountID, ...policyMembers]);
// 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 ? policyMembers : [];
const participants = _.unique([currentUserAccountID, ...members]);
const policyReport = ReportUtils.buildOptimisticChatReport(
participants,
reportName,
Expand Down

0 comments on commit 4dd425f

Please sign in to comment.