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): registering guest multiple times cause message loss #32069

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

ggazzo
Copy link
Member

@ggazzo ggazzo commented Mar 26, 2024

introduced here:
#30993

When calling the method of register/setToken, when the value is the same, it loads the configs again (with the list of empty messages). As the room and department were the same, the application did not react to the change.

Now whenever a "sensitive" value changes, it will load the config and then the list of messages.

Proposed changes (including videos or screenshots)

Issue(s)

closes #32042

Steps to test or reproduce

Further comments

https://rocketchat.atlassian.net/browse/SUP-526

Copy link

changeset-bot bot commented Mar 26, 2024

🦋 Changeset detected

Latest commit: 287f17d

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

This PR includes changesets to release 31 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/livechat Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/gazzodown Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/models Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status 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

@ggazzo ggazzo changed the title fix: registering same guest multiple times cause message loss fix(livechat): registering guest multiple times cause message loss Mar 26, 2024
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.81%. Comparing base (a899d41) to head (287f17d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #32069   +/-   ##
========================================
  Coverage    54.80%   54.81%           
========================================
  Files         2299     2299           
  Lines        50793    50793           
  Branches     10394    10394           
========================================
+ Hits         27839    27844    +5     
+ Misses       20456    20448    -8     
- Partials      2498     2501    +3     
Flag Coverage Δ
e2e 53.76% <ø> (-0.03%) ⬇️
e2e-api 40.11% <ø> (+0.06%) ⬆️
unit 75.39% <ø> (ø)

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

@ggazzo ggazzo force-pushed the fix/register-guest branch from a92e42f to 13b5f37 Compare March 28, 2024 18:52
MartinSchoeler
MartinSchoeler previously approved these changes Mar 28, 2024
@ggazzo ggazzo added this to the 6.7 milestone Mar 28, 2024
@ggazzo ggazzo force-pushed the fix/register-guest branch from fa2a29c to 27d0582 Compare March 28, 2024 23:46
@ggazzo ggazzo marked this pull request as ready for review March 28, 2024 23:47
@ggazzo ggazzo requested review from a team as code owners March 28, 2024 23:47
@ggazzo ggazzo force-pushed the fix/register-guest branch from 27d0582 to 8256028 Compare March 28, 2024 23:51
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Apr 1, 2024
@ggazzo ggazzo force-pushed the fix/register-guest branch from 5416b54 to 6cf4688 Compare April 2, 2024 18:05
@ggazzo ggazzo force-pushed the fix/register-guest branch from 6cf4688 to 287f17d Compare April 2, 2024 22:11
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 2, 2024
@ggazzo ggazzo removed the stat: ready to merge PR tested and approved waiting for merge label Apr 2, 2024
@ggazzo ggazzo merged commit e5d94d5 into develop Apr 2, 2024
54 checks passed
@ggazzo ggazzo deleted the fix/register-guest branch April 2, 2024 23:01
gabriellsh added a commit that referenced this pull request Apr 4, 2024
* develop: (71 commits)
  fix: search room not reactive after room name changes (#32123)
  test: fix `should edit name of targetChannel` flaky test (#32121)
  fix: UI allowing to mark room as favorite despite room was not a `default` room (#32063)
  chore: Remove duplicated `ChannelDeletionTable` (#32114)
  test(livechat): fix Department flaky test (#32102)
  test(livechat): File upload settings (#32060)
  test: contact center after hook calling wrong endpoint (#32094)
  fix(livechat): registering guest multiple times cause message loss (#32069)
  test: allow csp for livechat tests (#32116)
  chore: Move portals to the portals folder (#32090)
  test: `InitialData.insertAdminUserFromEnv` (#32066)
  fix: `CSP` error right after `setInlineScriptsAllowed` (#32108)
  chore: Create/Edit room consistency (#31960)
  chore: Remove references to EE code from the app events (#31926)
  test(Livechat): Clean up after registerGuest() test (#32092)
  test: make presence api tests fully independent (#31782)
  test: make roles fully independent (#31783)
  chore: bump version to 7.0.0-develop
  test: make login api tests fully independent (#31786)
  fix!: api login should not suggest which credential is wrong (#32086)
  ...
gabriellsh added a commit that referenced this pull request Apr 4, 2024
* origin:
  refactor: `TeamsChannels` to typescript (#32109)
  fix: search room not reactive after room name changes (#32123)
  test: fix `should edit name of targetChannel` flaky test (#32121)
  fix: UI allowing to mark room as favorite despite room was not a `default` room (#32063)
  chore: Remove duplicated `ChannelDeletionTable` (#32114)
  test(livechat): fix Department flaky test (#32102)
  test(livechat): File upload settings (#32060)
  test: contact center after hook calling wrong endpoint (#32094)
  fix(livechat): registering guest multiple times cause message loss (#32069)
  test: allow csp for livechat tests (#32116)
  chore: Move portals to the portals folder (#32090)
  test: `InitialData.insertAdminUserFromEnv` (#32066)
  fix: `CSP` error right after `setInlineScriptsAllowed` (#32108)
@RocketChat RocketChat deleted a comment from dionisio-bot bot Apr 18, 2024
@ggazzo
Copy link
Member Author

ggazzo commented Apr 18, 2024

/backport 6.6.7

Copy link
Contributor

dionisio-bot bot commented Apr 18, 2024

Sorry, I couldn't do that backport because of conflicts. Could you please solve them?

you can do so by running the following commands:

git fetch
git checkout backport-6.6.7-32069
git cherry-pick e5d94d53c4123be8cda3ad9c112442d98e2e43d4
// solve the conflict
git push

after that just run /backport 6.6.7 again

@ggazzo
Copy link
Member Author

ggazzo commented Apr 23, 2024

/backport 6.6.7

Copy link
Contributor

dionisio-bot bot commented Apr 23, 2024

Pull request #32300 added to Project: "Patch 6.6.7"

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.

[Bug]: Livechat - Calling registerGuest() method with existing set token causes blank chat
3 participants