fix: add self user to MLS conversation when joining via invite link [WPB-22305]#21209
Merged
thisisamir98 merged 4 commits intoMay 5, 2026
Merged
Conversation
Contributor
|
🔗 Download Full Report Artifact 🧪 Playwright Test Summary
|
thisisamir98
reviewed
May 4, 2026
thisisamir98
reviewed
May 4, 2026
|
thisisamir98
approved these changes
May 5, 2026
screendriver
pushed a commit
that referenced
this pull request
May 15, 2026
…WPB-22305] (#21209) * fix: add self user to MLS conversation when joining via invite link * pr comments * refactor * improve logs --------- Co-authored-by: Amir Ghezelbash <thisisamir98@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



when joining a conv via invite link the web app was not sending welcome message to invite self user other clients to the conv
to test the fix you must have user A on web and mobile, and user B does not matter
expected:
A should see this message on web and mobile
actual:
A sees the message only on web
to fix it i used codex with GPT-5.5 using this prompt
join an MLS conv via invite link is broken for other self clients when joining from this web app
my theory is the app is not doing step 8 from what the android app is doing
Here’s the Android/Kalium flow for “join MLS conversation via invite link”, with the CoreCrypto calls called out.
Flow
Public API: JoinConversationViaCodeUseCase
calls
conversationGroupRepository.joinViaInviteCode(code, key, null, password).Backend invite join: ConversationGroupRepository
calls:
Network side is
POST /conversations/join.If backend returns
Changed, Kalium emits the local member-join event, reads the conversation protocol, and if it is MLS-capable starts crypto transactionjoinViaInviteCode.Inside that transaction, Kalium first joins the MLS group:
JoinExistingMLSConversationUseCase
fetches group info:
implemented at ConversationApiV5.
Then Kalium calls:
which calls CoreCrypto:
at MLSConversationRepository.
The actual CoreCrypto binding call is:
context.joinByExternalCommit( groupInfo = publicGroupState.toGroupInfo(), customConfiguration = CUSTOM_CONFIGURATION_DEFAULT, credentialType = DEFAULT or X509, )at MLSClientImpl.
After that succeeds, Kalium reads the local epoch:
and marks the local DB group state as
ESTABLISHED.Important second step: after external commit succeeds, invite-link join also calls:
mlsConversationRepository.addMemberToMLSGroup( mlsContext, groupId, listOf(selfUserId), cipherSuite )See ConversationGroupRepository.
addMemberToMLSGroupfirst commits pending proposals:then claims key packages for
selfUserId, then calls either:or, if there are no key packages:
See MLSConversationRepository and MLSConversationRepository.
CoreCrypto implementations for those are:
See MLSClientImpl and MLSClientImpl.
Transport detail web may be missing
Kalium does not manually POST every generated MLS commit from the repository. The MLS client is created with an
MLSTransporter; CoreCrypto uses that transport to send commit bundles. The transport calls:mlsMessageApi.sendCommitBundle(...)which posts:
See MLSTransportProvider and MLSMessageApiV5.
So the short version to send web is: