-
Notifications
You must be signed in to change notification settings - Fork 6
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: mls client init [WPB-15022] #3178
Conversation
selfTeamIdProvider().getOrNull(), | ||
val mlsGroupState = conversation.groupId?.let { mlsGroupState(idMapper.fromGroupIDEntity(it), originatedFromEvent) } | ||
// if group state is left, then we don't want to persist the conversation | ||
if (mlsGroupState?.fold({ true }, { false }) != true) { |
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.
Can't we use isRight()
instead of fold()?
if (mlsGroupState?.fold({ true }, { false }) != true) { | |
if (mlsGroupState?.isRight() |
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.
I don't know why but tests where failing when I was using is left or right
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.
👏 Nicely done stepping up for this issue ! I just left a small suggestion.
logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/ConversationRepository.kt
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/candidate #3178 +/- ##
==================================================
Coverage 54.14% 54.14%
==================================================
Files 1250 1250
Lines 36458 36477 +19
Branches 3689 3696 +7
==================================================
+ Hits 19740 19751 +11
- Misses 15294 15298 +4
- Partials 1424 1428 +4
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 3236 Passed, 107 Skipped, 1m 1.13s Total Time |
Quality Gate passedIssues Measures |
* fix: secure mls client creation with is mls enabled * fix: dont persist mls conversations when mls is disabled * review improvements
* fix: secure mls client creation with is mls enabled * fix: dont persist mls conversations when mls is disabled * review improvements Co-authored-by: Jakub Żerko <[email protected]>
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
There is scenario when mls client can be created when mls feature config is disabled
Causes (Optional)
Before enabling MLS on feature config backend can change
cipherSuiteTag
causing encryption problems when user can already use some defaultcipherSuiteTag
if he created MLS client earlier.Solutions
MLSFailure.Disabled
MLSKeyPackageCountUseCase
to not fetch key package count when MLS is disabled by feature config