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
This commit is contained in:
Jorge Martín
2026-04-24 09:11:07 +02:00
committed by Damir Jelić
parent 02f9f7a26c
commit 547a0ea114

View File

@@ -64,6 +64,7 @@ pub struct RoomInfo {
topic: Option<String>,
avatar_url: Option<String>,
is_direct: bool,
is_dm: bool,
/// Whether the room is public or not, based on the join rules.
///
/// Can be `None` if the join rules state event is not available for this
@@ -160,6 +161,7 @@ impl RoomInfo {
topic: room.topic(),
avatar_url: room.avatar_url().map(Into::into),
is_direct: room.is_direct().await?,
is_dm: room.is_dm().await?,
is_public: room.is_public(),
is_space: room.is_space(),
successor_room: room.successor_room().map(Into::into),