Merge branch 'develop' into feature/fga/message_queuing
This commit is contained in:
commit
b927daffe7
620 changed files with 6821 additions and 1244 deletions
|
|
@ -33,3 +33,5 @@ value class ThreadId(val value: String) : Serializable {
|
|||
|
||||
override fun toString(): String = value
|
||||
}
|
||||
|
||||
fun ThreadId.asEventId(): EventId = EventId(value)
|
||||
|
|
|
|||
|
|
@ -330,5 +330,10 @@ interface MatrixRoom : Closeable {
|
|||
*/
|
||||
suspend fun getPermalinkFor(eventId: EventId): Result<String>
|
||||
|
||||
/**
|
||||
* Send an Element Call started notification if needed.
|
||||
*/
|
||||
suspend fun sendCallNotificationIfNeeded(): Result<Unit>
|
||||
|
||||
override fun close() = destroy()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,13 @@ interface Timeline : AutoCloseable {
|
|||
|
||||
suspend fun enterSpecialMode(eventId: EventId?): Result<Unit>
|
||||
|
||||
suspend fun replyMessage(eventId: EventId, body: String, htmlBody: String?, mentions: List<Mention>): Result<Unit>
|
||||
suspend fun replyMessage(
|
||||
eventId: EventId,
|
||||
body: String,
|
||||
htmlBody: String?,
|
||||
mentions: List<Mention>,
|
||||
fromNotification: Boolean = false,
|
||||
): Result<Unit>
|
||||
|
||||
suspend fun sendImage(
|
||||
file: File,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package io.element.android.libraries.matrix.api.timeline.item.event
|
|||
import androidx.compose.runtime.Immutable
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.matrix.api.media.ImageInfo
|
||||
import io.element.android.libraries.matrix.api.media.MediaSource
|
||||
import io.element.android.libraries.matrix.api.poll.PollAnswer
|
||||
import io.element.android.libraries.matrix.api.poll.PollKind
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
|
|
@ -40,7 +41,7 @@ data object RedactedContent : EventContent
|
|||
data class StickerContent(
|
||||
val body: String,
|
||||
val info: ImageInfo,
|
||||
val url: String
|
||||
val source: MediaSource,
|
||||
) : EventContent
|
||||
|
||||
data class PollContent(
|
||||
|
|
@ -102,4 +103,6 @@ data class FailedToParseStateContent(
|
|||
|
||||
data object LegacyCallInviteContent : EventContent
|
||||
|
||||
data object CallNotifyContent : EventContent
|
||||
|
||||
data object UnknownContent : EventContent
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ object EventType {
|
|||
const val CALL_NEGOTIATE = "m.call.negotiate"
|
||||
const val CALL_REJECT = "m.call.reject"
|
||||
const val CALL_HANGUP = "m.call.hangup"
|
||||
const val CALL_NOTIFY = "m.call.notify"
|
||||
|
||||
// This type is not processed by the client, just sent to the server
|
||||
const val CALL_REPLACES = "m.call.replaces"
|
||||
|
|
@ -94,6 +95,7 @@ object EventType {
|
|||
type == CALL_SELECT_ANSWER ||
|
||||
type == CALL_NEGOTIATE ||
|
||||
type == CALL_REJECT ||
|
||||
type == CALL_REPLACES
|
||||
type == CALL_REPLACES ||
|
||||
type == CALL_NOTIFY
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue