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

feat(dynamic-branding): Add config options that represent URLs. #15364

Closed
wants to merge 1 commit into from

Conversation

hristoterezov
Copy link
Member

No description provided.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This pull request was not sent to the PullRequest network because the pull request is a draft.

@hristoterezov hristoterezov marked this pull request as ready for review December 5, 2024 22:47
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 This pull request has been sent to HackerOne's PullRequest review team because our automation detected one or more changes with potential security impact or requires further evaluation. Experts are now being assigned to this review based on relevant expertise and will validate or dismiss any security findings accordingly and post their feedback as comments within this pull request.


Check the status or cancel this secure code review here.

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling that rather than changing every place to read the URLs from 2 places, we might be better off using updateConfig (we already have the mechanism in-place) to update the current config with other partial parts.

I realize that this would have been better from the start, but hey, here we are.


return prejoinConfig?.preCallTestICEUrl;
return preCallTest?.iceUrl || prejoinConfig?.preCallTestICEUrl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use ?? everywhere. It makes sense because it won't fall trough if the chosen value is false for example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My worry is that ?? won't catch the '' value and we tend to return '' in the backend service if the value is missing. Of course we can change the backend service and actually there is an effort in the direction to return only what the client have set but even then I don't think it is a bad thing to guarded for ''.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's the case it might be better to filter the empty strings when we parse the backend response so we don't need to do check everywhere no?

* Returns the salesforce integration URL.
*
* @param {Function|Object} stateful - The redux store or {@code getState} function.
* @returns {URL} - The salesforce integration URL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retusns a string.

@@ -40,7 +41,7 @@ export const useSalesforceLinkDialog = () => {
const [ hasDetailsErrors, setDetailsErrors ] = useState(false);
const conference = useSelector(getCurrentConference);
const sessionId = conference?.getMeetingUniqueId();
const { salesforceUrl = '' } = useSelector((state: IReduxState) => state['features/base/config']);
const salesforceUrl = useSelector((state: IReduxState) => getSalesforceUrl(state) ?? '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const salesforceUrl = useSelector((state: IReduxState) => getSalesforceUrl(state) ?? '');
const salesforceUrl = useSelector(getSalesforceUrl);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a default value here? Make getSalesforceUrl always return a string then?

@hristoterezov hristoterezov force-pushed the config_options_dynamic_branding branch from 8a39cf0 to f5162e0 Compare December 9, 2024 17:00
@hristoterezov
Copy link
Member Author

Closed in favor of #15373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants