-
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: Sending of message in empty MLS group #WPB-14747 🍒 #3177
fix: Sending of message in empty MLS group #WPB-14747 🍒 #3177
Conversation
* fix: Sending of message in empty MLS group * Fixed code style * Fixed tests
Quality Gate passedIssues Measures |
Bencher Report
Click to view all benchmark results
|
Datadog ReportBranch report: ✅ 0 Failed, 3239 Passed, 107 Skipped, 1m 1.64s Total Time |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3177 +/- ##
===========================================
- Coverage 54.14% 54.13% -0.01%
===========================================
Files 1252 1252
Lines 36527 36528 +1
Branches 3703 3703
===========================================
Hits 19776 19776
- Misses 15326 15327 +1
Partials 1425 1425
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
This PR was automatically cherry-picked based on the following PR:
Original PR description:
What's new in this PR?
Issues
When user creates empty MLS group (self user is the only member) and has only 1 client. Then sending messages always fails in such a group.
Causes (Optional)
According to logs, send message error:
InvalidRequestError(errorResponse=ErrorResponse(code=400, message=Application messages at epoch 0 are not supported, label=mls-protocol-error, cause=null))
.Why
epoch = 0
?How it should work: when client creates MLS group
epoch
set 0, after that we suppose to add some users and when do that epoch is updated. But when the group is empty, no updating epoch.There is "workaround" for that case calling
updateKeyingMaterial(idMapper.toCryptoModel(groupID))
but it didn't work because ofif(userIdList.isEmpty())
but it's always false, cause userIdList includes self userId.Solutions
Update
if
ininternalAddMemberToMLSGroup
to check not userIds butclientKeyPackageList
if empty.In that case when client creates empty MLS group
clientKeyPackageList
will be empty and workaround works.