-
Notifications
You must be signed in to change notification settings - Fork 10k
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: OTR conversation closes automatically when any of the peers goes offline #32430
Conversation
|
Looks like this PR is ready to merge! 🎉 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #32430 +/- ##
===========================================
- Coverage 56.35% 56.33% -0.03%
===========================================
Files 2433 2438 +5
Lines 53765 53846 +81
Branches 11090 11103 +13
===========================================
+ Hits 30301 30333 +32
- Misses 20852 20865 +13
- Partials 2612 2648 +36
Flags with carried forward coverage won't be shown. Click here to find out more. |
9a484ea
to
342ccbb
Compare
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!
Proposed changes (including videos or screenshots)
Issue(s)
https://rocketchat.atlassian.net/browse/SUP-447
Steps to test or reproduce
Fixes #7974
Further comments
The fix involves adding a listener to user presence in 2 places:
This will allow any of the parties to end the session when the other party goes offline.
This will also trigger when one of the parties logs out.
When one of the involved user logs out, we'll clear the
instancesByRoomId
object. This will allow the user to login to a clean sheet and open any OTR conversation again (after a refresh, but this is caused by another bug).