feat(crypto-ffi): externalize parsing of E2eiClientId [WPB-25836]#2184
Merged
SimonThormeyer merged 7 commits intoMay 29, 2026
Merged
Conversation
d124365 to
1040cac
Compare
Member
|
Can we come up with a better name for "ClientIdTriple"? The first commit's message has a typo: |
af4939c to
ed9fe5d
Compare
This type wraps `ClientId` and verifies upon instantiation that it conforms to the `<userid>-<device-id>@<domain>` format. `E2eiClientId` would have been another natural canditate to wrap, since it holds the triple data internally. However, this type is intended to be used as a `ClientId` more often than it is to be used as `E2eiClientId`, so it should deref to the former.
9963ece to
d7c4444
Compare
We have to have this data structure to be able to return an `Arc<ClientId>` via uniffi, which is useful in client code and tests. This forces us to make the `try_parse()` function in the `crypto` crate public to avoid doing more cloning than necessary.
d7c4444 to
624e259
Compare
coriolinus
approved these changes
May 29, 2026
Contributor
coriolinus
left a comment
There was a problem hiding this comment.
Nice. The only question I have is why you changed the names in the tests from clientId to clientIdTriple, but ultimately, the variable names in tests don't really matter.
Member
Author
Good catch, that should be |
624e259 to
8ff57db
Compare
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.
What's new in this PR
This is going to be followed by at least another PR, which is going to aim to drop all the different kinds of client ids in favor of the new
ClientIdTripleandClientIdin thecryptocrate.The e2ei crate will remain untouched, except that the
legacy::idmodule is going to be removed.PR Submission Checklist for internal contributors
SQPIT-764feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.