Merge branch 'develop' into feature/fga/waiting_ss_room
This commit is contained in:
commit
10c2859fac
249 changed files with 3147 additions and 677 deletions
|
|
@ -25,8 +25,8 @@ import io.element.android.libraries.matrix.api.media.AudioInfo
|
|||
import io.element.android.libraries.matrix.api.media.FileInfo
|
||||
import io.element.android.libraries.matrix.api.media.ImageInfo
|
||||
import io.element.android.libraries.matrix.api.media.VideoInfo
|
||||
import io.element.android.libraries.matrix.api.room.location.AssetType
|
||||
import io.element.android.libraries.matrix.api.timeline.MatrixTimeline
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import java.io.Closeable
|
||||
import java.io.File
|
||||
|
|
@ -70,7 +70,7 @@ interface MatrixRoom : Closeable {
|
|||
|
||||
suspend fun sendMessage(message: String): Result<Unit>
|
||||
|
||||
suspend fun editMessage(originalEventId: EventId, message: String): Result<Unit>
|
||||
suspend fun editMessage(originalEventId: EventId?, transactionId: String?, message: String): Result<Unit>
|
||||
|
||||
suspend fun replyMessage(eventId: EventId, message: String): Result<Unit>
|
||||
|
||||
|
|
@ -122,6 +122,16 @@ interface MatrixRoom : Closeable {
|
|||
* @param body A human readable textual representation of the location.
|
||||
* @param geoUri A geo URI (RFC 5870) representing the location e.g. `geo:51.5008,0.1247;u=35`.
|
||||
* Respectively: latitude, longitude, and (optional) uncertainty.
|
||||
* @param description Optional description of the location to display to the user.
|
||||
* @param zoomLevel Optional zoom level to display the map at.
|
||||
* @param assetType Optional type of the location asset.
|
||||
* Set to SENDER if sharing own location. Set to PIN if sharing any location.
|
||||
*/
|
||||
suspend fun sendLocation(body: String, geoUri: String): Result<Unit>
|
||||
suspend fun sendLocation(
|
||||
body: String,
|
||||
geoUri: String,
|
||||
description: String? = null,
|
||||
zoomLevel: Int? = null,
|
||||
assetType: AssetType? = null,
|
||||
): Result<Unit>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2023 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.matrix.api.room.location
|
||||
|
||||
enum class AssetType {
|
||||
SENDER,
|
||||
PIN
|
||||
}
|
||||
|
|
@ -128,6 +128,7 @@ data class ImageMessageType(
|
|||
data class LocationMessageType(
|
||||
val body: String,
|
||||
val geoUri: String,
|
||||
val description: String?,
|
||||
) : MessageType
|
||||
|
||||
data class AudioMessageType(
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ data class EventTimelineItem(
|
|||
val isLocal: Boolean,
|
||||
val isOwn: Boolean,
|
||||
val isRemote: Boolean,
|
||||
val localSendState: EventSendState?,
|
||||
val localSendState: LocalEventSendState?,
|
||||
val reactions: List<EventReaction>,
|
||||
val sender: UserId,
|
||||
val senderProfile: ProfileTimelineDetails,
|
||||
|
|
|
|||
|
|
@ -18,15 +18,15 @@ package io.element.android.libraries.matrix.api.timeline.item.event
|
|||
|
||||
import io.element.android.libraries.matrix.api.core.EventId
|
||||
|
||||
sealed interface EventSendState {
|
||||
object NotSentYet : EventSendState
|
||||
object Canceled : EventSendState
|
||||
sealed interface LocalEventSendState {
|
||||
object NotSentYet : LocalEventSendState
|
||||
object Canceled : LocalEventSendState
|
||||
|
||||
data class SendingFailed(
|
||||
val error: String
|
||||
) : EventSendState
|
||||
) : LocalEventSendState
|
||||
|
||||
data class Sent(
|
||||
val eventId: EventId
|
||||
) : EventSendState
|
||||
) : LocalEventSendState
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue