Skip to content

Commit 5df4ddf

Browse files
committed
common: remove now-unused ShieldStateCode::SentInClear
1 parent 58fc0e5 commit 5df4ddf

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

crates/matrix-sdk-common/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
66

77
## [Unreleased] - ReleaseDate
88

9+
### Features
10+
11+
- [**breaking**] `ShieldStateCode` no longer includes
12+
`SentInClear`. `VeificationState::to_shield_state_{lax,strict}` never
13+
returned that code, ans so having it in the enum was somewhat misleading.
14+
([#5959](https://github.com/matrix-org/matrix-rust-sdk/pull/5959))
15+
916
### Bug Fixes
1017

1118
- 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)).

crates/matrix-sdk-common/src/deserialized_responses.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,6 @@ pub enum ShieldStateCode {
282282
UnsignedDevice,
283283
/// The sender hasn't been verified by the Client's user.
284284
UnverifiedIdentity,
285-
/// An unencrypted event in an encrypted room.
286-
SentInClear,
287285
/// The sender was previously verified but changed their identity.
288286
#[serde(alias = "PreviouslyVerified")]
289287
VerificationViolation,
@@ -1983,7 +1981,6 @@ mod tests {
19831981
assert_json_snapshot!(ShieldStateCode::UnknownDevice);
19841982
assert_json_snapshot!(ShieldStateCode::UnsignedDevice);
19851983
assert_json_snapshot!(ShieldStateCode::UnverifiedIdentity);
1986-
assert_json_snapshot!(ShieldStateCode::SentInClear);
19871984
assert_json_snapshot!(ShieldStateCode::VerificationViolation);
19881985
});
19891986
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
source: crates/matrix-sdk-common/src/deserialized_responses.rs
3-
expression: "ShieldStateCode::SentInClear"
3+
expression: "ShieldStateCode::VerificationViolation"
44
---
5-
"SentInClear"
5+
"VerificationViolation"

crates/matrix-sdk-ui/src/timeline/event_item/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ impl From<ShieldStateCode> for TimelineEventShieldStateCode {
755755
ShieldStateCode::UnknownDevice => UnknownDevice,
756756
ShieldStateCode::UnsignedDevice => UnsignedDevice,
757757
ShieldStateCode::UnverifiedIdentity => UnverifiedIdentity,
758-
ShieldStateCode::SentInClear => SentInClear,
759758
ShieldStateCode::VerificationViolation => VerificationViolation,
760759
ShieldStateCode::MismatchedSender => MismatchedSender,
761760
}

0 commit comments

Comments
 (0)