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(Livechat): Popout mode not working in cross domains #33944

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

Conversation

MartinSchoeler
Copy link
Contributor

@MartinSchoeler MartinSchoeler commented Nov 12, 2024

Proposed changes (including videos or screenshots)

Fixes issue that caused the popout mode of livechat to not work in cross domains situations, such as the rocketchat server being in one domain an the website that embedded livechat being in another. Operations between different domains are restricted so the localstorage never managed to actually sync between the two domains, creating different sessions when opening the popover view

I've changed the approach to sync the popout window with the server when opened using the livechat api call setToken in the popout window. After the popout is closed, when opening the normal widget again, it will sync with the server too, to get all the info of the popout session (new messages, dep/agent changes, etc...)

Issue(s)

SUP-462

Copy link
Contributor

dionisio-bot bot commented Nov 12, 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 Nov 12, 2024

🦋 Changeset detected

Latest commit: a07a40c

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

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.19%. Comparing base (92b6a50) to head (a07a40c).
Report is 8 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #33944   +/-   ##
========================================
  Coverage    75.19%   75.19%           
========================================
  Files          495      495           
  Lines        21601    21601           
  Branches      5362     5362           
========================================
  Hits         16242    16242           
  Misses        4717     4717           
  Partials       642      642           
Flag Coverage Δ
unit 75.19% <ø> (ø)

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

@MartinSchoeler MartinSchoeler changed the title fix(Livechat): Popout mode not working fix(Livechat): Popout mode not working in cross domains Nov 13, 2024
@MartinSchoeler MartinSchoeler marked this pull request as ready for review November 13, 2024 12:32
@MartinSchoeler MartinSchoeler requested review from a team as code owners November 13, 2024 12:32
Copy link
Member

@MarcosSpessatto MarcosSpessatto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a changeset?

@MarcosSpessatto MarcosSpessatto added this to the 7.1.0 milestone Nov 13, 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.

3 participants