common: remove now-unused ShieldStateCode::SentInClear

This commit is contained in:
Richard van der Hoff
2025-12-12 15:01:17 +00:00
parent d5ce01acab
commit b5f2128db1
4 changed files with 9 additions and 6 deletions

View File

@@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
## [Unreleased] - ReleaseDate
### Features
- [**breaking**] `ShieldStateCode` no longer includes
`SentInClear`. `VeificationState::to_shield_state_{lax,strict}` never
returned that code, ans so having it in the enum was somewhat misleading.
([#5959](https://github.com/matrix-org/matrix-rust-sdk/pull/5959))
### Bug Fixes
- Fix `TimelineEvent::from_bundled_latest_event` sometimes removing the `session_id` of UTDs. This broken event could later be saved to the event cache and become an unresolvable UTD. ([#5970](https://github.com/matrix-org/matrix-rust-sdk/pull/5970)).

View File

@@ -282,8 +282,6 @@ pub enum ShieldStateCode {
UnsignedDevice,
/// The sender hasn't been verified by the Client's user.
UnverifiedIdentity,
/// An unencrypted event in an encrypted room.
SentInClear,
/// The sender was previously verified but changed their identity.
#[serde(alias = "PreviouslyVerified")]
VerificationViolation,
@@ -1983,7 +1981,6 @@ mod tests {
assert_json_snapshot!(ShieldStateCode::UnknownDevice);
assert_json_snapshot!(ShieldStateCode::UnsignedDevice);
assert_json_snapshot!(ShieldStateCode::UnverifiedIdentity);
assert_json_snapshot!(ShieldStateCode::SentInClear);
assert_json_snapshot!(ShieldStateCode::VerificationViolation);
});
}

View File

@@ -1,5 +1,5 @@
---
source: crates/matrix-sdk-common/src/deserialized_responses.rs
expression: "ShieldStateCode::SentInClear"
expression: "ShieldStateCode::VerificationViolation"
---
"SentInClear"
"VerificationViolation"

View File

@@ -755,7 +755,6 @@ impl From<ShieldStateCode> for TimelineEventShieldStateCode {
ShieldStateCode::UnknownDevice => UnknownDevice,
ShieldStateCode::UnsignedDevice => UnsignedDevice,
ShieldStateCode::UnverifiedIdentity => UnverifiedIdentity,
ShieldStateCode::SentInClear => SentInClear,
ShieldStateCode::VerificationViolation => VerificationViolation,
ShieldStateCode::MismatchedSender => MismatchedSender,
}