Add MatrixRoomInfo.rawName.
This commit is contained in:
parent
9e519def63
commit
7353381356
3 changed files with 6 additions and 0 deletions
|
|
@ -27,7 +27,10 @@ import kotlinx.collections.immutable.ImmutableMap
|
||||||
@Immutable
|
@Immutable
|
||||||
data class MatrixRoomInfo(
|
data class MatrixRoomInfo(
|
||||||
val id: RoomId,
|
val id: RoomId,
|
||||||
|
/** The room's name from the room state event if received from sync, or one that's been computed otherwise. */
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
/** Room name as defined by the room state event only. */
|
||||||
|
val rawName: String?,
|
||||||
val topic: String?,
|
val topic: String?,
|
||||||
val avatarUrl: String?,
|
val avatarUrl: String?,
|
||||||
val isDirect: Boolean,
|
val isDirect: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class MatrixRoomInfoMapper(
|
||||||
return MatrixRoomInfo(
|
return MatrixRoomInfo(
|
||||||
id = RoomId(it.id),
|
id = RoomId(it.id),
|
||||||
name = it.displayName,
|
name = it.displayName,
|
||||||
|
rawName = it.rawName,
|
||||||
topic = it.topic,
|
topic = it.topic,
|
||||||
avatarUrl = it.avatarUrl,
|
avatarUrl = it.avatarUrl,
|
||||||
isDirect = it.isDirect,
|
isDirect = it.isDirect,
|
||||||
|
|
|
||||||
|
|
@ -735,6 +735,7 @@ data class EndPollInvocation(
|
||||||
fun aRoomInfo(
|
fun aRoomInfo(
|
||||||
id: RoomId = A_ROOM_ID,
|
id: RoomId = A_ROOM_ID,
|
||||||
name: String? = A_ROOM_NAME,
|
name: String? = A_ROOM_NAME,
|
||||||
|
rawName: String? = name,
|
||||||
topic: String? = "A topic",
|
topic: String? = "A topic",
|
||||||
avatarUrl: String? = AN_AVATAR_URL,
|
avatarUrl: String? = AN_AVATAR_URL,
|
||||||
isDirect: Boolean = false,
|
isDirect: Boolean = false,
|
||||||
|
|
@ -759,6 +760,7 @@ fun aRoomInfo(
|
||||||
) = MatrixRoomInfo(
|
) = MatrixRoomInfo(
|
||||||
id = id,
|
id = id,
|
||||||
name = name,
|
name = name,
|
||||||
|
rawName = rawName,
|
||||||
topic = topic,
|
topic = topic,
|
||||||
avatarUrl = avatarUrl,
|
avatarUrl = avatarUrl,
|
||||||
isDirect = isDirect,
|
isDirect = isDirect,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue