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

feat: user joins mls group with guest link #14832

Merged
merged 10 commits into from
Mar 20, 2023

Conversation

PatrykBuniX
Copy link
Contributor

@PatrykBuniX PatrykBuniX commented Mar 16, 2023

When user receives member-join event, and it's also a creator of this event, it means that user has joined by himself, therefore we need to add its other clients to mls group if conversation is using mls protocol

@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Merging #14832 (a0d0688) into dev (4323ba2) will increase coverage by 0.10%.
The diff coverage is 65.51%.

❗ Current head a0d0688 differs from pull request most recent head aae8341. Consider uploading reports for the commit aae8341 to get more accurate results

@@            Coverage Diff             @@
##              dev   #14832      +/-   ##
==========================================
+ Coverage   42.78%   42.89%   +0.10%     
==========================================
  Files         622      622              
  Lines       21257    21280      +23     
  Branches     4880     4886       +6     
==========================================
+ Hits         9095     9127      +32     
+ Misses      11003    10993      -10     
- Partials     1159     1160       +1     

@PatrykBuniX PatrykBuniX marked this pull request as ready for review March 16, 2023 10:27
@PatrykBuniX PatrykBuniX requested review from a team and otto-the-bot as code owners March 16, 2023 10:27
@PatrykBuniX PatrykBuniX force-pushed the feat/user-joins-mls-group-with-guest-link branch from 68f4026 to 0fb2146 Compare March 16, 2023 12:15
@@ -746,6 +752,46 @@ describe('ConversationRepository', () => {
});
});

it('should add other self clients to mls group if user was event creator', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

🤩

@@ -2460,28 +2460,34 @@ export class ConversationRepository {
});
}

// Self user is a creator of the event
const isFromSelf = eventJson.from === this.userState.self().id;

// Self user joins again
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, removed it 👌

Copy link
Contributor

@atomrc atomrc left a comment

Choose a reason for hiding this comment

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

Looks solid. Great job 😎

@PatrykBuniX PatrykBuniX merged commit 55d419a into dev Mar 20, 2023
@PatrykBuniX PatrykBuniX deleted the feat/user-joins-mls-group-with-guest-link branch March 20, 2023 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants