Skip to content

Commit 4dd425f

Browse files
authored
Merge pull request #22385 from Expensify/francois-fixPublicRoomsOfflineMemberVisibility
2 parents c088821 + 8a468b5 commit 4dd425f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libs/actions/Report.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,8 +1200,9 @@ function navigateToConciergeChat() {
12001200
* @param {Array} policyMembers
12011201
*/
12021202
function addPolicyReport(policyID, reportName, visibility, policyMembers) {
1203-
// The participants include the current user (admin) and the employees. Participants must not be empty.
1204-
const participants = _.unique([currentUserAccountID, ...policyMembers]);
1203+
// The participants include the current user (admin), and for restricted rooms, the policy members. Participants must not be empty.
1204+
const members = visibility === CONST.REPORT.VISIBILITY.RESTRICTED ? policyMembers : [];
1205+
const participants = _.unique([currentUserAccountID, ...members]);
12051206
const policyReport = ReportUtils.buildOptimisticChatReport(
12061207
participants,
12071208
reportName,

0 commit comments

Comments
 (0)