-
Notifications
You must be signed in to change notification settings - Fork 11k
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: Agents can't leave omnichannel rooms that have already been closed #32707
Conversation
🦋 Changeset detectedLatest commit: 10f01a1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 32 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 |
Looks like this PR is ready to merge! 🎉 |
Fix? |
Yep, should be fix. Also, pls add a description of what this fixes (+ changeset). It should be clear which case of rooms getting stuck this fix clears 🤗 |
…nto fix/dangling-subscriptions-livechat-rooms
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #32707 +/- ##
===========================================
+ Coverage 54.38% 55.53% +1.14%
===========================================
Files 2552 2633 +81
Lines 55985 57197 +1212
Branches 11614 11848 +234
===========================================
+ Hits 30450 31762 +1312
+ Misses 22933 22745 -188
- Partials 2602 2690 +88
Flags with carried forward coverage won't be shown. Click here to find out more. |
…ithub.com/RocketChat/Rocket.Chat into fix/dangling-subscriptions-livechat-rooms
…nto fix/dangling-subscriptions-livechat-rooms
…nto fix/dangling-subscriptions-livechat-rooms
/patch |
/backport 6.9.3 |
/patch |
after that just run |
/backport 6.9.4 |
Sorry, I couldn't do that backport because of conflicts. Could you please solve them? you can do so by running the following commands:
after that just run |
/patch |
Pull request #32819 added to Project: "Patch 6.10.1" |
/backport 6.9.4 |
Pull request #32822 added to Project: "Patch 6.9.4" |
Proposed changes (including videos or screenshots)
close-livechat-room
orclose-others-livechat-room
) to close a room.Due to some race condition, users could end up joining omnichannel rooms that have already been closed, which caused them to get stuck in there.
Issue(s)
Steps to test or reproduce
Since having a user stuck in an omnichannel room after it's been closed depends on a race condition, reproducing this issue may require manually inserting a subscription in the DB.
With a user that is stuck in an omnichannel/livechat room, try to close the room again through the UI or using the
livechat.closeRoomByUser
endpoint OR thelivechat:closeRoom
method. Both options currently throw an error in this case, but with this PR, the subscription is removed and a succesful result should be returned.Further comments
I decided not to add this change to the
livechat.closeRoom
endpoint since this one is meant to be used by visitors -- which are not subscribed to the room directly, only agents are.SUP-612