fix: set cookie without port in JitsiMeetView to fix #5852 #6507
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5852
Problem
When opening a Jitsi meeting in the Rocket.Chat React Native app, users see a green preloader and never actually join the call when using a custom Jitsi server with a non-standard HTTPS port (e.g., 8443 instead of 443).
This regression was introduced by the fix for #2286, specifically in PR #5458, which added cookie support to the JitsiMeetView component.
Root Cause
The code uses the full meeting URL to extract the cookie domain. However, when the Jitsi server is running on a non-default HTTPS port, the extracted domain includes the port (e.g.,
example.com:8443
), which is not a valid domain for setting a cookie. Per the HTTP cookie spec, the domain should not include the port.As a result, setting the cookie fails silently, and the JitsiMeetView fails to join the meeting.
Fix
This PR ensures that the cookie domain passed to
JitsiMeetView
never includes a port number, even when the meeting URL uses a custom port.Testing
Tested with both:
https://meet.jit.si
(port 443)https://example.com:8443
In both cases, meetings can now be joined successfully.