Skip to content

Commit 547a0ea

Browse files
jmartinesppoljar
authored andcommitted
feat(ffi): Add RoomInfo::is_dm field
With this, the clients won't have to manually check on their side if a room is a DM or not
1 parent 02f9f7a commit 547a0ea

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

bindings/matrix-sdk-ffi/src/room/room_info.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ pub struct RoomInfo {
6464
topic: Option<String>,
6565
avatar_url: Option<String>,
6666
is_direct: bool,
67+
is_dm: bool,
6768
/// Whether the room is public or not, based on the join rules.
6869
///
6970
/// Can be `None` if the join rules state event is not available for this
@@ -160,6 +161,7 @@ impl RoomInfo {
160161
topic: room.topic(),
161162
avatar_url: room.avatar_url().map(Into::into),
162163
is_direct: room.is_direct().await?,
164+
is_dm: room.is_dm().await?,
163165
is_public: room.is_public(),
164166
is_space: room.is_space(),
165167
successor_room: room.successor_room().map(Into::into),

0 commit comments

Comments
 (0)