RoomSummary

data class RoomSummary(    val roomId: String,     val displayName: String = "",     val name: String = "",     val topic: String = "",     val avatarUrl: String = "",     val canonicalAlias: String? = null,     val aliases: List<String> = emptyList(),     val joinRules: RoomJoinRules? = null,     val isDirect: Boolean = false,     val directUserId: String? = null,     val directUserPresence: UserPresence? = null,     val joinedMembersCount: Int? = 0,     val invitedMembersCount: Int? = 0,     val latestPreviewableEvent: TimelineEvent? = null,     val otherMemberIds: List<String> = emptyList(),     val notificationCount: Int = 0,     val highlightCount: Int = 0,     val threadNotificationCount: Int = 0,     val threadHighlightCount: Int = 0,     val hasUnreadMessages: Boolean = false,     val tags: List<RoomTag> = emptyList(),     val membership: Membership = Membership.NONE,     val versioningState: VersioningState = VersioningState.NONE,     val readMarkerId: String? = null,     val userDrafts: List<UserDraft> = emptyList(),     val isEncrypted: Boolean,     val encryptionEventTs: Long?,     val typingUsers: List<SenderInfo>,     val inviterId: String? = null,     val breadcrumbsIndex: Int = NOT_IN_BREADCRUMBS,     val roomEncryptionTrustLevel: RoomEncryptionTrustLevel? = null,     val hasFailedSending: Boolean = false,     val roomType: String? = null,     val spaceParents: List<SpaceParentInfo>? = null,     val spaceChildren: List<SpaceChildInfo>? = null,     val directParentNames: List<String> = emptyList(),     val flattenParentIds: List<String> = emptyList(),     val roomEncryptionAlgorithm: RoomEncryptionAlgorithm? = null)

This class holds some data of a room. It can be retrieved by org.matrix.android.sdk.api.session.room.Room and org.matrix.android.sdk.api.session.room.RoomService

Constructors

Link copied to clipboard
fun RoomSummary(    roomId: String,     displayName: String = "",     name: String = "",     topic: String = "",     avatarUrl: String = "",     canonicalAlias: String? = null,     aliases: List<String> = emptyList(),     joinRules: RoomJoinRules? = null,     isDirect: Boolean = false,     directUserId: String? = null,     directUserPresence: UserPresence? = null,     joinedMembersCount: Int? = 0,     invitedMembersCount: Int? = 0,     latestPreviewableEvent: TimelineEvent? = null,     otherMemberIds: List<String> = emptyList(),     notificationCount: Int = 0,     highlightCount: Int = 0,     threadNotificationCount: Int = 0,     threadHighlightCount: Int = 0,     hasUnreadMessages: Boolean = false,     tags: List<RoomTag> = emptyList(),     membership: Membership = Membership.NONE,     versioningState: VersioningState = VersioningState.NONE,     readMarkerId: String? = null,     userDrafts: List<UserDraft> = emptyList(),     isEncrypted: Boolean,     encryptionEventTs: Long?,     typingUsers: List<SenderInfo>,     inviterId: String? = null,     breadcrumbsIndex: Int = NOT_IN_BREADCRUMBS,     roomEncryptionTrustLevel: RoomEncryptionTrustLevel? = null,     hasFailedSending: Boolean = false,     roomType: String? = null,     spaceParents: List<SpaceParentInfo>? = null,     spaceChildren: List<SpaceChildInfo>? = null,     directParentNames: List<String> = emptyList(),     flattenParentIds: List<String> = emptyList(),     roomEncryptionAlgorithm: RoomEncryptionAlgorithm? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun hasTag(tag: String): Boolean

Test if the room has the provided tag.

Properties

Link copied to clipboard
val aliases: List<String>

The list of all the aliases of this room. Content of the live state event m.room.aliases.

Link copied to clipboard
val avatarUrl: String

The value of the live state event m.room.avatar.

Link copied to clipboard
val breadcrumbsIndex: Int

Breadcrumb index, util to sort rooms by last seen.

Link copied to clipboard
val canonicalAlias: String? = null

The value of the live state event m.room.canonical_alias.

Link copied to clipboard
val canStartCall: Boolean

True if a 1-1 call can be started, i.e. the room has exactly 2 joined members.

Link copied to clipboard
val directParentNames: List<String>

The names of the room's direct space parents if any.

Link copied to clipboard
val directUserId: String? = null

If isDirect is true, this is the id of the first other member of this room.

Link copied to clipboard
val directUserPresence: UserPresence? = null

If isDirect is true, this it the presence of the first other member of this room.

Link copied to clipboard
val displayName: String

Computed display name. The value of the state event m.room.name if not empty, else can be the value returned by org.matrix.android.sdk.api.RoomDisplayNameFallbackProvider.

Link copied to clipboard
val encryptionEventTs: Long?

Timestamp of the m.room.encryption state event.

Link copied to clipboard
val flattenParentIds: List<String>

List of all the space parent Ids.

Link copied to clipboard
val hasFailedSending: Boolean = false

True if a message has not been sent in this room.

Link copied to clipboard
val hasNewMessages: Boolean

True if notificationCount is not 0.

Link copied to clipboard
val hasUnreadMessages: Boolean = false

True if this room has unread messages.

Link copied to clipboard
val highlightCount: Int = 0

Number of unread and highlighted message in this room.

Link copied to clipboard
val invitedMembersCount: Int? = 0

Number of members who are invited to this room.

Link copied to clipboard
val inviterId: String? = null

UserId of the user who has invited the current user to this room.

Link copied to clipboard
val isDirect: Boolean = false

True is this room is referenced in the account data m.direct.

Link copied to clipboard
val isEncrypted: Boolean

True if this room is encrypted.

Link copied to clipboard
val isFavorite: Boolean

True if the room has the tag m.favourite.

Link copied to clipboard
val isLowPriority: Boolean

True if the room has the tag m.lowpriority.

Link copied to clipboard
val isPublic: Boolean
Link copied to clipboard
val isVersioned: Boolean
Link copied to clipboard
val joinedMembersCount: Int? = 0

Number of members who have joined this room.

Link copied to clipboard
val joinRules: RoomJoinRules? = null

The value of the live state event m.room.join_rules.

Link copied to clipboard
val latestPreviewableEvent: TimelineEvent? = null

Latest TimelineEvent which can be displayed in this room. Can be used in the room list.

Link copied to clipboard
val membership: Membership

Current user membership in this room.

Link copied to clipboard
val name: String

The value of the live state event m.room.name.

Link copied to clipboard
val notificationCount: Int = 0

Number of unread message in this room.

Link copied to clipboard
val otherMemberIds: List<String>

List of other member ids of this room.

Link copied to clipboard
val readMarkerId: String? = null

Value of m.fully_read for this room.

Link copied to clipboard
val roomEncryptionAlgorithm: RoomEncryptionAlgorithm? = null

Information about the encryption algorithm, if this room is encrypted.

Link copied to clipboard
val roomEncryptionTrustLevel: RoomEncryptionTrustLevel? = null

The room encryption trust level.

Link copied to clipboard
val roomId: String

The roomId of the room.

Link copied to clipboard
val roomType: String? = null

The type of the room. Null for regular room.

Link copied to clipboard
val spaceChildren: List<SpaceChildInfo>? = null

List of children space.

Link copied to clipboard
val spaceParents: List<SpaceParentInfo>? = null

List of parent spaces.

Link copied to clipboard
val tags: List<RoomTag>

List of tags in this room.

Link copied to clipboard
val threadHighlightCount: Int = 0

Number of threads with highlighted messages in this room.

Link copied to clipboard
val threadNotificationCount: Int = 0

Number of threads with unread messages in this room.

Link copied to clipboard
val topic: String

The value of the live state event m.room.topic.

Link copied to clipboard
val typingUsers: List<SenderInfo>

List of users who are currently typing on this room.

Link copied to clipboard
val userDrafts: List<UserDraft>

Message saved as draft for this room.

Link copied to clipboard
val versioningState: VersioningState

Versioning state of this room.

Extensions

Link copied to clipboard
Link copied to clipboard
fun RoomSummary.toMatrixItem(): MatrixItem
Link copied to clipboard