-
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 #3176
fix: Sending of message in empty MLS group #WPB-14747 #3176
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 3233 Passed, 107 Skipped, 1m 2.4s Total Time |
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/candidate #3176 +/- ##
=====================================================
- Coverage 54.14% 54.14% -0.01%
=====================================================
Files 1250 1250
Lines 36457 36458 +1
Branches 3689 3689
=====================================================
Hits 19739 19739
- Misses 15294 15295 +1
Partials 1424 1424
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
* fix: Sending of message in empty MLS group * Fixed code style * Fixed tests
* fix: Sending of message in empty MLS group * Fixed code style * Fixed tests Co-authored-by: boris <[email protected]> Co-authored-by: Yamil Medina <[email protected]>
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.