Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# [unreleased]

Breaking changes:

* The list_room response changes the fields `version`, `join_rules`, `guest_access` and `history_visibility` to be an option
* The list_room response changes the `join_rules` field to be `Option<SpaceRoomJoinRule>`

Improvement:

* The list_room response now includes the `room_type` field


# 0.7.0

* Upgrade to ruma 0.12.0
Expand Down
19 changes: 11 additions & 8 deletions src/rooms/list_rooms/v1.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! [GET /_synapse/admin/v1/rooms](https://github.com/matrix-org/synapse/blob/master/docs/admin_api/rooms.md#list-room-api)
//! [GET /_synapse/admin/v1/rooms](https://github.com/element-hq/synapse/blob/master/docs/admin_api/rooms.md#list-room-api)
use ruma::{
api::{metadata, request, response, Metadata},
events::room::{
guest_access::GuestAccess, history_visibility::HistoryVisibility, join_rules::JoinRule,
},
events::room::{guest_access::GuestAccess, history_visibility::HistoryVisibility},
room::RoomType,
serde::StringEnum,
space::SpaceRoomJoinRule,
OwnedRoomAliasId, OwnedRoomId, OwnedUserId, UInt,
};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -162,7 +162,7 @@ pub struct RoomDetails {
pub joined_local_members: UInt,

/// Room version
pub version: String,
pub version: Option<String>,

/// User ID of the room creator.
#[serde(deserialize_with = "ruma::serde::empty_string_as_none")]
Expand All @@ -180,14 +180,17 @@ pub struct RoomDetails {
pub public: bool,

/// Join rules of the room.
pub join_rules: JoinRule,
pub join_rules: Option<SpaceRoomJoinRule>,

/// Guest access of the room
pub guest_access: GuestAccess,
pub guest_access: Option<GuestAccess>,

/// History visibility of the room
pub history_visibility: HistoryVisibility,
pub history_visibility: Option<HistoryVisibility>,

/// State events of the room.
pub state_events: UInt,

/// Room type of the room.
pub room_type: Option<RoomType>,
}
Loading