File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ All notable changes to this project will be documented in this file.
8
8
9
9
### Features:
10
10
11
+ - Add ` room_version ` and ` privileged_creators_role ` to ` RoomInfo ` ([ #5449 ] ( https://github.com/matrix-org/matrix-rust-sdk/pull/5449 ) ).
11
12
- The [ ` unstable-hydra ` ] feature has been enabled, which enables room v12 changes in the SDK.
12
- [ ( #5450 ) ] ( https://github.com/matrix-org/matrix-rust-sdk/pull/5450 ) .
13
+ ( [ #5450 ] ( https://github.com/matrix-org/matrix-rust-sdk/pull/5450 ) ).
13
14
- Add experimental support for
14
15
[ MSC4306] ( https://github.com/matrix-org/matrix-spec-proposals/pull/4306 ) , with the
15
16
` Room::fetch_thread_subscription() ` and ` Room::set_thread_subscription() ` methods.
Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ pub struct RoomInfo {
76
76
power_levels : Option < Arc < RoomPowerLevels > > ,
77
77
/// This room's version.
78
78
room_version : Option < String > ,
79
+ /// Whether creators are privileged over every other user (have infinite
80
+ /// power level).
81
+ privileged_creators_role : bool ,
79
82
}
80
83
81
84
impl RoomInfo {
@@ -155,6 +158,11 @@ impl RoomInfo {
155
158
history_visibility : room. history_visibility_or_default ( ) . try_into ( ) ?,
156
159
power_levels : power_levels. map ( Arc :: new) ,
157
160
room_version : room. version ( ) . map ( |version| version. to_string ( ) ) ,
161
+ privileged_creators_role : room
162
+ . version ( )
163
+ . and_then ( |version| version. rules ( ) )
164
+ . map ( |rules| rules. authorization . explicitly_privilege_room_creators )
165
+ . unwrap_or_default ( ) ,
158
166
} )
159
167
}
160
168
}
You can’t perform that action at this time.
0 commit comments