Skip to content

Commit eeddf05

Browse files
committed
Fix matrix_sdk::Room::parent_spaces event types in comments.
1 parent e3ca7d1 commit eeddf05

File tree

1 file changed

+7
-7
lines changed
  • crates/matrix-sdk/src/room

1 file changed

+7
-7
lines changed

crates/matrix-sdk/src/room/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ impl Room {
11661166
// Implements this algorithm:
11671167
// https://spec.matrix.org/v1.8/client-server-api/#mspaceparent-relationships
11681168

1169-
// Get all m.room.parent events for this room
1169+
// Get all m.space.parent events for this room
11701170
Ok(self
11711171
.get_state_events_static::<SpaceParentEventContent>()
11721172
.await?
@@ -1179,7 +1179,7 @@ impl Room {
11791179
Ok(SyncOrStrippedState::Sync(SyncStateEvent::Redacted(_))) => None,
11801180
Ok(SyncOrStrippedState::Stripped(e)) => Some((e.state_key.to_owned(), e.sender)),
11811181
Err(e) => {
1182-
info!(room_id = ?self.room_id(), "Could not deserialize m.room.parent: {e}");
1182+
info!(room_id = ?self.room_id(), "Could not deserialize m.space.parent: {e}");
11831183
None
11841184
}
11851185
})
@@ -1190,15 +1190,15 @@ impl Room {
11901190
// TODO: try peeking into the room
11911191
return Ok(ParentSpace::Unverifiable(state_key));
11921192
};
1193-
// Get the m.room.child state of the parent with this room's id
1193+
// Get the m.space.child state of the parent with this room's id
11941194
// as state key.
11951195
if let Some(child_event) = parent_room
11961196
.get_state_event_static_for_key::<SpaceChildEventContent, _>(self.room_id())
11971197
.await?
11981198
{
11991199
match child_event.deserialize() {
12001200
Ok(SyncOrStrippedState::Sync(SyncStateEvent::Original(_))) => {
1201-
// There is a valid m.room.child in the parent pointing to
1201+
// There is a valid m.space.child in the parent pointing to
12021202
// this room
12031203
return Ok(ParentSpace::Reciprocal(parent_room));
12041204
}
@@ -1207,7 +1207,7 @@ impl Room {
12071207
Err(e) => {
12081208
info!(
12091209
room_id = ?self.room_id(), parent_room_id = ?state_key,
1210-
"Could not deserialize m.room.child: {e}"
1210+
"Could not deserialize m.space.child: {e}"
12111211
);
12121212
}
12131213
}
@@ -1217,7 +1217,7 @@ impl Room {
12171217
// relationship: https://spec.matrix.org/v1.8/client-server-api/#mspacechild
12181218
}
12191219

1220-
// No reciprocal m.room.child found, let's check if the sender has the
1220+
// No reciprocal m.space.child found, let's check if the sender has the
12211221
// power to set it
12221222
let Some(member) = parent_room.get_member(&sender).await? else {
12231223
// Sender is not even in the parent room
@@ -3964,7 +3964,7 @@ pub enum ParentSpace {
39643964
Reciprocal(Room),
39653965
/// The room recognizes the given room as its parent, but the parent does
39663966
/// not recognizes it as its child. However, the author of the
3967-
/// `m.room.parent` event in the room has a sufficient power level in the
3967+
/// `m.space.parent` event in the room has a sufficient power level in the
39683968
/// parent to create the child event.
39693969
WithPowerlevel(Room),
39703970
/// The room recognizes the given room as its parent, but the parent does

0 commit comments

Comments
 (0)