-
Notifications
You must be signed in to change notification settings - Fork 234
Improve connection URL handling and add unit tests #1468
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
Conversation
|
size-limit report 📦
|
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.
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
Files not reviewed (2)
- package.json: Language not supported
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)
src/api/utils.ts:15
- [nitpick] Consider renaming the parameter 'rtcWsUrl' to 'rtcUrl' to better reflect that its value is converted to an HTTP URL within the function.
export function createValidateUrl(rtcWsUrl: string) {
src/api/SignalClient.ts:264
- Ensure that 'params' is an instance of URLSearchParams as expected by createRtcUrl; passing a different type may result in incorrect URL construction.
const rtcUrl = createRtcUrl(url, params);
src/api/SignalClient.ts:307
- Confirm that createRtcUrl returns a URL with the appropriate WebSocket protocol (ws or wss) required for establishing a connection; any protocol alteration might lead to connection failures.
this.ws = new WebSocket(rtcUrl);
builds on top of the findings in #1467 and extends it by extracting things into its own util module to make it testable