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

Merged
merged 9 commits into from
Jun 11, 2024

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: 0a569cc

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 ready to merge! 🎉
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 missing coverage. Please review.

Project coverage is 56.33%. Comparing base (3d74b63) to head (0a569cc).

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 56.04% <22.72%> (-0.06%) ⬇️
unit 71.80% <ø> (ø)

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
@scuciatto scuciatto added the stat: QA assured Means it has been tested and approved by a company insider label Jun 11, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 11, 2024
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Jun 11, 2024
@scuciatto scuciatto added stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider labels Jun 11, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 11, 2024
@kodiakhq kodiakhq bot merged commit 811f316 into develop Jun 11, 2024
47 of 49 checks passed
@kodiakhq kodiakhq bot deleted the fix/otr-yet-again branch June 11, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OTR e-mail notifications: remove message payload
3 participants