Merge branch 'develop' into feature/fga/join_space
This commit is contained in:
commit
c4308e9810
446 changed files with 5669 additions and 2617 deletions
|
|
@ -156,11 +156,6 @@ interface MatrixClient {
|
|||
*/
|
||||
suspend fun currentSlidingSyncVersion(): Result<SlidingSyncVersion>
|
||||
|
||||
/**
|
||||
* Returns the available sliding sync versions for the current user.
|
||||
*/
|
||||
suspend fun availableSlidingSyncVersions(): Result<List<SlidingSyncVersion>>
|
||||
|
||||
fun canDeactivateAccount(): Boolean
|
||||
suspend fun deactivateAccount(password: String, eraseData: Boolean): Result<Unit>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,14 +13,9 @@ import io.element.android.libraries.matrix.api.auth.external.ExternalSession
|
|||
import io.element.android.libraries.matrix.api.auth.qrlogin.MatrixQrCodeLoginData
|
||||
import io.element.android.libraries.matrix.api.auth.qrlogin.QrCodeLoginStep
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
import io.element.android.libraries.sessionstorage.api.LoggedInState
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
||||
interface MatrixAuthenticationService {
|
||||
fun loggedInStateFlow(): Flow<LoggedInState>
|
||||
suspend fun getLatestSessionId(): SessionId?
|
||||
|
||||
/**
|
||||
* Restore a session from a [sessionId].
|
||||
* Do not restore anything it the access token is not valid anymore.
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ object MatrixPatterns {
|
|||
val urlMatch = match.groupValues[1]
|
||||
when (val permalink = permalinkParser.parse(urlMatch)) {
|
||||
is PermalinkData.UserLink -> {
|
||||
add(MatrixPatternResult(MatrixPatternType.USER_ID, permalink.userId.toString(), match.range.first, match.range.last + 1))
|
||||
add(MatrixPatternResult(MatrixPatternType.USER_ID, permalink.userId.value, match.range.first, match.range.last + 1))
|
||||
}
|
||||
is PermalinkData.RoomLink -> {
|
||||
when (permalink.roomIdOrAlias) {
|
||||
|
|
|
|||
|
|
@ -49,9 +49,10 @@ sealed interface NotificationContent {
|
|||
val senderId: UserId,
|
||||
) : MessageLike
|
||||
|
||||
data class CallNotify(
|
||||
data class RtcNotification(
|
||||
val senderId: UserId,
|
||||
val type: CallNotifyType,
|
||||
val type: RtcNotificationType,
|
||||
val expirationTimestampMillis: Long
|
||||
) : MessageLike
|
||||
|
||||
data object CallHangup : MessageLike
|
||||
|
|
@ -118,7 +119,7 @@ sealed interface NotificationContent {
|
|||
) : NotificationContent
|
||||
}
|
||||
|
||||
enum class CallNotifyType {
|
||||
enum class RtcNotificationType {
|
||||
RING,
|
||||
NOTIFY
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import io.element.android.libraries.matrix.api.room.tombstone.PredecessorRoom
|
|||
import io.element.android.libraries.matrix.api.roomdirectory.RoomVisibility
|
||||
import io.element.android.libraries.matrix.api.timeline.ReceiptType
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import java.io.Closeable
|
||||
|
||||
|
|
@ -239,7 +240,11 @@ interface BaseRoom : Closeable {
|
|||
*/
|
||||
suspend fun reportRoom(reason: String?): Result<Unit>
|
||||
|
||||
/**
|
||||
suspend fun declineCall(notificationEventId: EventId): Result<Unit>
|
||||
|
||||
suspend fun subscribeToCallDecline(notificationEventId: EventId): Flow<UserId>
|
||||
|
||||
/**
|
||||
* Destroy the room and release all resources associated to it.
|
||||
*/
|
||||
fun destroy()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ enum class MessageEventType {
|
|||
CALL_INVITE,
|
||||
CALL_HANGUP,
|
||||
CALL_CANDIDATES,
|
||||
CALL_NOTIFY,
|
||||
RTC_NOTIFICATION,
|
||||
KEY_VERIFICATION_READY,
|
||||
KEY_VERIFICATION_START,
|
||||
KEY_VERIFICATION_CANCEL,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ data class RoomMember(
|
|||
val membership: RoomMembershipState,
|
||||
val isNameAmbiguous: Boolean,
|
||||
val powerLevel: Long,
|
||||
val normalizedPowerLevel: Long,
|
||||
val isIgnored: Boolean,
|
||||
val role: Role,
|
||||
val membershipChangeReason: String?,
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ interface Timeline : AutoCloseable {
|
|||
|
||||
suspend fun redactEvent(eventOrTransactionId: EventOrTransactionId, reason: String?): Result<Unit>
|
||||
|
||||
suspend fun toggleReaction(emoji: String, eventOrTransactionId: EventOrTransactionId): Result<Unit>
|
||||
suspend fun toggleReaction(emoji: String, eventOrTransactionId: EventOrTransactionId): Result<Boolean>
|
||||
|
||||
suspend fun forwardEvent(eventId: EventId, roomIds: List<RoomId>): Result<Unit>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@ object EventType {
|
|||
|
||||
// Call Events
|
||||
const val CALL_INVITE = "m.call.invite"
|
||||
const val CALL_NOTIFY = "m.call.notify"
|
||||
|
||||
const val RTC_NOTIFICATION = "org.matrix.msc4075.rtc.notification"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,12 +11,9 @@ import dev.zacsweers.metro.Inject
|
|||
import dev.zacsweers.metro.SingleIn
|
||||
import io.element.android.libraries.di.SessionScope
|
||||
import io.element.android.libraries.matrix.api.MatrixClient
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
|
||||
@SingleIn(SessionScope::class)
|
||||
@Inject
|
||||
class CurrentSessionIdHolder(matrixClient: MatrixClient) {
|
||||
val current = matrixClient.sessionId
|
||||
|
||||
fun isCurrentSession(sessionId: SessionId?): Boolean = current == sessionId
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@ interface CallWidgetSettingsProvider {
|
|||
widgetId: String = UUID.randomUUID().toString(),
|
||||
encrypted: Boolean,
|
||||
direct: Boolean,
|
||||
hasActiveCall: Boolean,
|
||||
): MatrixWidgetSettings
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue