RoomStrippedState

@JsonClass(generateAdapter = true)
data class RoomStrippedState(    @Json(name = "aliases") val aliases: List<String>? = null,     @Json(name = "canonical_alias") val canonicalAlias: String? = null,     @Json(name = "name") val name: String? = null,     @Json(name = "num_joined_members") val numJoinedMembers: Int = 0,     @Json(name = "room_id") val roomId: String,     @Json(name = "topic") val topic: String? = null,     @Json(name = "world_readable") val worldReadable: Boolean = false,     @Json(name = "guest_can_join") val guestCanJoin: Boolean = false,     @Json(name = "avatar_url") val avatarUrl: String? = null,     @Json(name = "m.federate") val isFederated: Boolean = false,     @Json(name = "is_encrypted") val isEncrypted: Boolean?,     @Json(name = "room_type") val roomType: String?,     @Json(name = "membership") val membership: String?)

These are the same fields as those returned by /publicRooms, with a few additions: room_type, membership and is_encrypted.

Constructors

Link copied to clipboard
fun RoomStrippedState(    @Json(name = "aliases") aliases: List<String>? = null,     @Json(name = "canonical_alias") canonicalAlias: String? = null,     @Json(name = "name") name: String? = null,     @Json(name = "num_joined_members") numJoinedMembers: Int = 0,     @Json(name = "room_id") roomId: String,     @Json(name = "topic") topic: String? = null,     @Json(name = "world_readable") worldReadable: Boolean = false,     @Json(name = "guest_can_join") guestCanJoin: Boolean = false,     @Json(name = "avatar_url") avatarUrl: String? = null,     @Json(name = "m.federate") isFederated: Boolean = false,     @Json(name = "is_encrypted") isEncrypted: Boolean?,     @Json(name = "room_type") roomType: String?,     @Json(name = "membership") membership: String?)

Functions

Link copied to clipboard
fun getPrimaryAlias(): String?

Return the canonical alias, or the first alias from the list of aliases, or null.

Properties

Link copied to clipboard
val aliases: List<String>? = null

Aliases of the room. May be empty.

Link copied to clipboard
val avatarUrl: String? = null

The URL for the room's avatar, if one is set.

Link copied to clipboard
val canonicalAlias: String? = null

The canonical alias of the room, if any.

Link copied to clipboard
val guestCanJoin: Boolean = false

Required. Whether guest users may join the room and participate in it. If they can, they will be subject to ordinary power level rules like any other user.

Link copied to clipboard
val isEncrypted: Boolean?

Optional. If the room is encrypted. This is already accessible as stripped state.

Link copied to clipboard
val isFederated: Boolean = false

Undocumented item.

Link copied to clipboard
val membership: String?

The current membership of this user in the room. Usually leave if the room is fetched over federation.

Link copied to clipboard
val name: String? = null

The name of the room, if any.

Link copied to clipboard
val numJoinedMembers: Int = 0

Required. The number of members joined to the room.

Link copied to clipboard
val roomId: String

Required. The ID of the room.

Link copied to clipboard
val roomType: String?

Optional. Type of the room, if any, i.e. m.space

Link copied to clipboard
val topic: String? = null

The topic of the room, if any.

Link copied to clipboard
val worldReadable: Boolean = false

Required. Whether the room may be viewed by guest users without joining.