Skip to content

Commit ceda62a

Browse files
kilimnikzecakeh
authored andcommitted
feat: list_rooms add missing room_type field
1 parent c9c32d2 commit ceda62a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# [unreleased]
22

3+
Breaking changes:
4+
5+
* The list_room response changes the fields `version`, `join_rules`, `guest_access` and `history_visibility` to be an option
6+
* The list_room response changes the `join_rules` field to be `Option<SpaceRoomJoinRule>`
7+
8+
Improvement:
9+
10+
* The list_room response now includes the `room_type` field
11+
12+
313
# 0.7.0
414

515
* Upgrade to ruma 0.12.0

src/rooms/list_rooms/v1.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
use ruma::{
33
api::{metadata, request, response, Metadata},
44
events::room::{guest_access::GuestAccess, history_visibility::HistoryVisibility},
5+
room::RoomType,
56
serde::StringEnum,
67
space::SpaceRoomJoinRule,
78
OwnedRoomAliasId, OwnedRoomId, OwnedUserId, UInt,
@@ -161,7 +162,7 @@ pub struct RoomDetails {
161162
pub joined_local_members: UInt,
162163

163164
/// Room version
164-
pub version: String,
165+
pub version: Option<String>,
165166

166167
/// User ID of the room creator.
167168
#[serde(deserialize_with = "ruma::serde::empty_string_as_none")]
@@ -189,4 +190,7 @@ pub struct RoomDetails {
189190

190191
/// State events of the room.
191192
pub state_events: UInt,
193+
194+
/// Room type of the room.
195+
pub room_type: Option<RoomType>,
192196
}

0 commit comments

Comments
 (0)