sdk (space) : expose the via parameter from space room

This commit is contained in:
ganfra 2025-09-24 14:11:17 +02:00
parent dd2c9d4450
commit a2de7b8ddd
3 changed files with 8 additions and 1 deletions

View file

@ -28,6 +28,10 @@ data class SpaceRoom(
val state: CurrentUserMembership?,
val topic: String?,
val worldReadable: Boolean,
/**
* The via parameters of the room.
*/
val via: List<String>,
) {
val isSpace = roomType == RoomType.Space
}

View file

@ -31,6 +31,7 @@ class SpaceRoomMapper {
state = spaceRoom.state?.map(),
topic = spaceRoom.topic,
worldReadable = spaceRoom.worldReadable.orFalse(),
via = spaceRoom.via,
)
}
}

View file

@ -29,6 +29,7 @@ fun aSpaceRoom(
state: CurrentUserMembership? = null,
topic: String? = null,
worldReadable: Boolean = false,
via: List<String> = emptyList(),
) = SpaceRoom(
name = name,
avatarUrl = avatarUrl,
@ -42,5 +43,6 @@ fun aSpaceRoom(
roomType = roomType,
state = state,
topic = topic,
worldReadable = worldReadable
worldReadable = worldReadable,
via = via,
)