Repository navigation
Fix optimistic members of restricted room #31526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1542,14 +1542,11 @@ function navigateToConciergeChat(ignoreConciergeReportID = false) { | |
| * @param {String} policyID | ||
| * @param {String} reportName | ||
| * @param {String} visibility | ||
| * @param {Array<Number>} policyMembersAccountIDs | ||
| * @param {String} writeCapability | ||
| * @param {String} welcomeMessage | ||
| */ | ||
| function addPolicyReport(policyID, reportName, visibility, policyMembersAccountIDs, writeCapability = CONST.REPORT.WRITE_CAPABILITIES.ALL, welcomeMessage = '') { | ||
| // 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]); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @parasharrajat Let's see the old logic here, we always add the current user to the member list here.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, Sorry. What an oversight. Thanks for bringing this up. |
||
| function addPolicyReport(policyID, reportName, visibility, writeCapability = CONST.REPORT.WRITE_CAPABILITIES.ALL, welcomeMessage = '') { | ||
| const participants = [currentUserAccountID]; | ||
| const parsedWelcomeMessage = ReportUtils.getParsedComment(welcomeMessage); | ||
| const policyReport = ReportUtils.buildOptimisticChatReport( | ||
| participants, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here, we only add policy members for restricted room