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

fix: race condition in livechat popout mode cross origin #34158

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

MartinSchoeler
Copy link
Contributor

@MartinSchoeler MartinSchoeler commented Dec 10, 2024

Proposed changes (including videos or screenshots)

We had an issue that caused the livechat popout mode to not work when in cross domains, this fix was developed #33944 but it had a race condition issue, trying to use window.postMessage() right after window.open() does not guarantee that the message will be received, and assuring that the page has loaded in cross domains can be very finicky, so I changed the approach to use the checkPoppedOutWindow callback to properly register the guest to the popover using something similar to the setGuestToken livechat api call

Issue(s)

SUP-708

Steps to test or reproduce

A good way to test this issue is to disable the registration form, that can cause the popover to have different tokens

@MartinSchoeler MartinSchoeler requested review from a team as code owners December 10, 2024 17:32
Copy link
Contributor

dionisio-bot bot commented Dec 10, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Dec 10, 2024

🦋 Changeset detected

Latest commit: 5dd7eaf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/livechat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-34158/
on branch gh-pages at 2024-12-10 17:36 UTC

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.79%. Comparing base (5c9dba6) to head (5dd7eaf).
Report is 8 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #34158      +/-   ##
===========================================
+ Coverage    75.75%   75.79%   +0.03%     
===========================================
  Files          510      511       +1     
  Lines        22078    22132      +54     
  Branches      5387     5394       +7     
===========================================
+ Hits         16726    16775      +49     
- Misses        4706     4709       +3     
- Partials       646      648       +2     
Flag Coverage Δ
unit 75.79% <ø> (+0.03%) ⬆️

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

@MartinSchoeler MartinSchoeler added this to the 7.2.0 milestone Dec 10, 2024
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.

1 participant