Skip to content
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

Use policyName sent back with public rooms for people who aren't in the workspace #15546

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,17 @@ function isArchivedRoom(report) {
* @param {Object} report
* @param {String} report.policyID
* @param {String} report.oldPolicyName
* @param {String} report.policyName
* @param {Object} policies must have Onyxkey prefix (i.e 'policy_') for keys
* @returns {String}
*/
function getPolicyName(report, policies) {
// Public rooms send back the policy name with the reportSummary,
// since they can also be accessed by people who aren't in the workspace
if (report.policyName) {
return report.policyName;
jasperhuangg marked this conversation as resolved.
Show resolved Hide resolved
}

if (_.isEmpty(policies)) {
return Localize.translateLocal('workspace.common.unavailable');
}
Expand Down