Skip to content

Commit

Permalink
feat: list_rooms add missing room_type field
Browse files Browse the repository at this point in the history
  • Loading branch information
kilimnik authored and zecakeh committed Jan 18, 2025
1 parent c9c32d2 commit ceda62a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
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
6 changes: 5 additions & 1 deletion src/rooms/list_rooms/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
use ruma::{
api::{metadata, request, response, Metadata},
events::room::{guest_access::GuestAccess, history_visibility::HistoryVisibility},
room::RoomType,
serde::StringEnum,
space::SpaceRoomJoinRule,
OwnedRoomAliasId, OwnedRoomId, OwnedUserId, UInt,
Expand Down Expand Up @@ -161,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 Down Expand Up @@ -189,4 +190,7 @@ pub struct RoomDetails {

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

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

0 comments on commit ceda62a

Please sign in to comment.