fix: livechat agent status set to available after reactivation
Proposed changes (including videos or screenshots)
This PR introduces a fix to the livechat agent status handling within Rocket.Chat. Previously, when a deactivated user, assigned as a livechat agent, was reactivated, their status in the livechat system was automatically set to 'Available'. This behavior was unintended as it could lead to conversations being assigned to agents who might not be ready to handle them. With this update, reactivated users will retain the 'Not Available' status until manually set to 'Available' by an admin or the agent themselves, ensuring better control and management of agent availability.
https://github.com/RocketChat/Rocket.Chat/assets/15830206/d1c053a8-be66-407a-8c6d-2b83bda53c34
Issue(s)
This PR addresses the issue where livechat agent status was incorrectly set to 'Available' upon the reactivation of a deactivated user. Deactivated users should not be made available when they get activated.
Steps to test or reproduce
To test this fix, follow these steps:
- As an admin, go to Admin Panel > Users and deactivate a user who is also a livechat agent.
- Observe in Omnichannel > Agents that the agent's status is correctly set to 'Not Available'.
- Reactivate the user in Admin Panel > Users.
- Check the status of the user in Omnichannel > Agents.
Further comments
🦋 Changeset detected
Latest commit: 61e570dcca7b70c8246b2f6bbaed528f0e928cef
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/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/livechat | 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
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 54.57%. Comparing base (
a011734) to head (61e570d).
Additional details and impacted files
@@ Coverage Diff @@
## develop #31651 +/- ##
===========================================
+ Coverage 54.55% 54.57% +0.02%
===========================================
Files 2283 2282 -1
Lines 50279 50248 -31
Branches 10255 10249 -6
===========================================
- Hits 27431 27425 -6
+ Misses 20356 20334 -22
+ Partials 2492 2489 -3
| Flag | Coverage Δ | |
|---|---|---|
| e2e | 53.51% <ø> (-0.02%) |
:arrow_down: |
| e2e-api | 40.07% <ø> (+0.08%) |
:arrow_up: |
| unit | 76.44% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.