From 1a1c61ee1e8f0936e956a3b69c931ce12ee28475 Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou Date: Sat, 24 Feb 2024 10:46:35 +0000 Subject: [PATCH] events: change type of state_key field of HierarchySpaceChildEvent to OwnedRoomId --- crates/ruma-events/CHANGELOG.md | 1 + crates/ruma-events/src/space/child.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ruma-events/CHANGELOG.md b/crates/ruma-events/CHANGELOG.md index a2235203..9d9368ea 100644 --- a/crates/ruma-events/CHANGELOG.md +++ b/crates/ruma-events/CHANGELOG.md @@ -9,6 +9,7 @@ Breaking changes: -`RoomPowerLevels::user_can_redact` is split into `user_can_redact_own_event` and `user_can_redact_event_of_other`, - `PowerLevelAction::Redact` is split into `RedactOwn` and `RedactOther`. +- Use `OwnedRoomId` instead of `String` for the `state_key` field of `HierarchySpaceChildEvent` Improvements: diff --git a/crates/ruma-events/src/space/child.rs b/crates/ruma-events/src/space/child.rs index 60a72a44..8174fe8d 100644 --- a/crates/ruma-events/src/space/child.rs +++ b/crates/ruma-events/src/space/child.rs @@ -63,7 +63,7 @@ pub struct HierarchySpaceChildEvent { pub sender: OwnedUserId, /// The room ID of the child. - pub state_key: String, + pub state_key: OwnedRoomId, /// Timestamp in milliseconds on originating homeserver when this event was sent. pub origin_server_ts: MilliSecondsSinceUnixEpoch,