-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: adds contact manager check before assigning to agent #35205
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: c2c8f6b The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #35205 +/- ##
===========================================
- Coverage 59.67% 59.64% -0.04%
===========================================
Files 2829 2828 -1
Lines 68786 68537 -249
Branches 15236 15191 -45
===========================================
- Hits 41051 40879 -172
+ Misses 25076 25010 -66
+ Partials 2659 2648 -11
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
MarcosSpessatto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some tests to ensure this behavior?
apps/meteor/ee/app/livechat-enterprise/server/hooks/handleNextAgentPreferredEvents.ts
Show resolved
Hide resolved
4a94986 to
bb6acd7
Compare
Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
aleksandernsilva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PS.: If you could create a separate PR with tests covering this scenario would be much appreciated.
|
Proposed changes (including videos or screenshots)
This PR fixes the Livechat routing algorithm to correctly assign conversations to the contact manager when triggers and/or automatic agent routing are enabled.
Checking contact manager on callback
livechat.checkDefaultAgentOnNewRoom: we now verify if the user has a different contact manager than the one initially assigned viaagent.nextorlivechat.configroutes.Handling contact manager on guest registration: in the
registerGuestmethod (server lib), we now check if the provided email is already associated with a contact manager. If a contact manager is found, the response from the visitor creation endpoint will include the correct manager data. This ensures that the Livechat widget UI correctly reflects agent changes during visitor creation.Issue(s)
Steps to test or reproduce
Further comments