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

Handle candidate: prefix with UnmarshalCandidate #769

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

JoeTurki
Copy link
Member

Description

Make UnmarshalCandidate able to handle candidate: prefix in the candidate string.

Before I made UnmarshalCandidate strict, if a user passed a candidate from WebRTC candidates' toJSON, UnmarshalCandidate would incorrectly interpret the candidate: prefix as part of the foundation as showed here, leading to an incorrect and invalid candidate. Now that we enforce strict parsing, we correctly return an error in such cases. However, this change also introduces the ability to parse candidates with the candidate: prefix directly without any breaking changes.

Copy link

codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.83%. Comparing base (37fb5d2) to head (ef453b3).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #769   +/-   ##
=======================================
  Coverage   78.82%   78.83%           
=======================================
  Files          41       41           
  Lines        5435     5437    +2     
=======================================
+ Hits         4284     4286    +2     
  Misses        921      921           
  Partials      230      230           
Flag Coverage Δ
go 78.83% <100.00%> (+<0.01%) ⬆️
wasm 27.10% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Make UnmarshalCandidate able to handle candidate: prefix in the
candidate string.
@JoeTurki JoeTurki merged commit ef453b3 into master Mar 25, 2025
15 checks passed
@JoeTurki JoeTurki deleted the trim-candidate-prefix branch March 25, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants