-
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
base: develop
Are you sure you want to change the base?
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #32430 +/- ##
===========================================
- Coverage 55.57% 55.55% -0.02%
===========================================
Files 2404 2411 +7
Lines 52896 53074 +178
Branches 10862 10905 +43
===========================================
+ Hits 29395 29487 +92
- Misses 20895 20966 +71
- Partials 2606 2621 +15
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).