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.
Resolves https:/matrix-org/internal-config/issues/1325
The SDK has previously relied on
MXUserTrustLevel
to determine whether any particular user is verified or not. It did so by distinguishing between "local" and "cross-signed" trust, where a user is considered verified if either one of those fields is true. This is however unnecessarily complex model, not used upcoming rust-crypto, and does not really make sense, given that "user verification" should only be possible via cross-signing, not by setting manual values.To improve this, remove
MXUserTrustLevel
entirely and replace it with a simpleisVerified
boolean. This makes the API everywhere much simpler to use. As a downside, we have to deal with some amount of migration from the previous model (we use NSCoding to persist these values). To ensure correct migration, we will now store "version" property in MXCrossSigningInfo, which is used to decode the values correctlyAdditionally replace
NSProgress
withMXTrustSummary
when computingtrustSummary
for more than one user or device. UsingNSProgress
has worked okay, but it makes for some strange and clunky API (e.g..fractionCompleted >= 0
instead ofallAreTrusted
).