-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Conversation
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.
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.
🔍 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.
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.
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; |
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.
Let's use ?? everywhere. It makes sense because it won't fall trough if the chosen value is false for example.
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.
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 ''
.
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.
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. |
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.
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) ?? ''); |
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.
const salesforceUrl = useSelector((state: IReduxState) => getSalesforceUrl(state) ?? ''); | |
const salesforceUrl = useSelector(getSalesforceUrl); |
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.
Why do we need a default value here? Make getSalesforceUrl
always return a string then?
8a39cf0
to
f5162e0
Compare
Closed in favor of #15373 |
No description provided.