Merge branch 'develop' into julioromano/poll_history_entry_point
This commit is contained in:
commit
5ac3f273ea
257 changed files with 916 additions and 1161 deletions
|
|
@ -18,6 +18,7 @@ package io.element.android.libraries.matrix.api.permalink
|
|||
|
||||
import android.net.Uri
|
||||
import androidx.compose.runtime.Immutable
|
||||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
|
||||
/**
|
||||
|
|
@ -32,7 +33,15 @@ sealed interface PermalinkData {
|
|||
val isRoomAlias: Boolean,
|
||||
val eventId: String?,
|
||||
val viaParameters: ImmutableList<String>
|
||||
) : PermalinkData
|
||||
) : PermalinkData {
|
||||
fun getRoomId(): RoomId? {
|
||||
return roomIdOrAlias.takeIf { !isRoomAlias }?.let(::RoomId)
|
||||
}
|
||||
|
||||
fun getRoomAlias(): String? {
|
||||
return roomIdOrAlias.takeIf { isRoomAlias }
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* &room_name=Team2
|
||||
|
|
|
|||
|
|
@ -16,7 +16,11 @@
|
|||
|
||||
package io.element.android.libraries.matrix.api.room
|
||||
|
||||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
|
||||
sealed interface Mention {
|
||||
data class User(val userId: String): Mention
|
||||
data class User(val userId: UserId): Mention
|
||||
data object AtRoom: Mention
|
||||
data class Room(val roomId: RoomId?, val roomAlias: String?): Mention
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ data class PollContent(
|
|||
val maxSelections: ULong,
|
||||
val answers: ImmutableList<PollAnswer>,
|
||||
val votes: ImmutableMap<String, ImmutableList<UserId>>,
|
||||
val endTime: ULong?
|
||||
val endTime: ULong?,
|
||||
val isEdited: Boolean,
|
||||
) : EventContent
|
||||
|
||||
data class UnableToDecryptContent(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue