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

Merged
merged 4 commits into from
Dec 19, 2024

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 ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Dec 10, 2024

🦋 Changeset detected

Latest commit: eb4dc8c

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

github-actions bot commented Dec 10, 2024

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-19 19:30 UTC

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.81%. Comparing base (278af14) to head (eb4dc8c).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #34158   +/-   ##
========================================
  Coverage    75.81%   75.81%           
========================================
  Files          512      512           
  Lines        22208    22208           
  Branches      5404     5404           
========================================
  Hits         16837    16837           
  Misses        4720     4720           
  Partials       651      651           
Flag Coverage Δ
unit 75.81% <ø> (ø)

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
@jeanfbrito jeanfbrito added the stat: QA assured Means it has been tested and approved by a company insider label Dec 19, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 19, 2024
@kodiakhq kodiakhq bot merged commit ed02a33 into develop Dec 19, 2024
49 checks passed
@kodiakhq kodiakhq bot deleted the fix/popout/clear branch December 19, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants