Skip to content
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

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

KevLehman
Copy link
Contributor

@KevLehman KevLehman commented May 13, 2024

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:

  • On acknowledge (this is, the user that starts the OTR session after the other party clicks on "yes" to start OTR)
  • On stablishment (the user clicking on "yes" on the modal)

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).

Copy link

changeset-bot bot commented May 13, 2024

⚠️ No Changeset found

Latest commit: eb2e29d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

dionisio-bot bot commented May 13, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is targeting the wrong base branch. It should target 6.10.0, but it targets 6.9.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 22.72727% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 55.55%. Comparing base (724ba3a) to head (eb2e29d).
Report is 30 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 54.99% <22.72%> (+0.13%) ⬆️
unit 73.01% <ø> (-0.50%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

yash-rajpal
yash-rajpal previously approved these changes May 14, 2024
apps/meteor/app/otr/client/OTRRoom.ts Outdated Show resolved Hide resolved
apps/meteor/app/otr/client/OTR.ts Show resolved Hide resolved
@KevLehman KevLehman changed the title fix: Allow OTR conversations to be automatically closed upon one of the parties going offline fix: OTR conversation closes automatically when any of the peers goes offline May 14, 2024
@KevLehman KevLehman marked this pull request as ready for review May 14, 2024 19:12
Copy link
Member

@yash-rajpal yash-rajpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@KevLehman KevLehman added this to the 6.9 milestone May 15, 2024
@scuciatto scuciatto modified the milestones: 6.9, 6.10 May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OTR e-mail notifications: remove message payload
3 participants